Skip to content

Commit

Permalink
Added forRemoval=true to all Java @deprecated annotations
Browse files Browse the repository at this point in the history
  • Loading branch information
cederberg committed Nov 23, 2023
1 parent 0318df3 commit a7da427
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 33 deletions.
4 changes: 2 additions & 2 deletions src/java/org/rapidcontext/app/plugin/Plugin.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
* @version 1.0
* @deprecated Use org.rapidcontext.core.type.Plugin instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public class Plugin extends org.rapidcontext.core.type.Plugin {

/**
Expand Down Expand Up @@ -58,7 +58,7 @@ public Plugin(String id, String type, Dict dict) {
* @deprecated Constructor signature has changed as plug-in objects
* are now initialized by the root storage.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Plugin(Dict dict) {
super(dict.get(KEY_ID, String.class, ""), "plugin", dict);
LOG.warning("deprecated: legacy plug-in constructor called for " + this);
Expand Down
1 change: 0 additions & 1 deletion src/java/org/rapidcontext/app/ui/MacApplication.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.lang.reflect.InvocationHandler;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.lang.reflect.Proxy;

Expand Down
18 changes: 9 additions & 9 deletions src/java/org/rapidcontext/core/data/Array.java
Original file line number Diff line number Diff line change
Expand Up @@ -460,7 +460,7 @@ public <T> T get(int index, Class<T> clazz) {
*
* @deprecated Use get(index, Object.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Object get(int index, Object defaultValue) {
Object value = get(index);
return (value == null) ? defaultValue : value;
Expand Down Expand Up @@ -506,7 +506,7 @@ public <T> T get(int index, Class<T> clazz, T defaultValue) {
*
* @deprecated Use get(index, String.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public String getString(int index, String defaultValue) {
return get(index, String.class, defaultValue);
}
Expand All @@ -526,7 +526,7 @@ public String getString(int index, String defaultValue) {
*
* @deprecated Use get(index, Boolean.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public boolean getBoolean(int index, boolean defaultValue) {
return get(index, Boolean.class, defaultValue);
}
Expand All @@ -549,7 +549,7 @@ public boolean getBoolean(int index, boolean defaultValue) {
*
* @deprecated Use get(index, Integer.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public int getInt(int index, int defaultValue) {
return get(index, Integer.class, defaultValue);
}
Expand All @@ -572,7 +572,7 @@ public int getInt(int index, int defaultValue) {
*
* @deprecated Use get(index, Date.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Date getDate(int index, Date defaultValue) {
return get(index, Date.class, defaultValue);
}
Expand Down Expand Up @@ -656,7 +656,7 @@ public Array set(int index, Object value)
*
* @deprecated Use set(index, value) with auto-boxing instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Array setBoolean(int index, boolean value)
throws IndexOutOfBoundsException, UnsupportedOperationException {

Expand All @@ -679,7 +679,7 @@ public Array setBoolean(int index, boolean value)
*
* @deprecated Use set(index, value) with auto-boxing instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Array setInt(int index, int value)
throws IndexOutOfBoundsException, UnsupportedOperationException {

Expand Down Expand Up @@ -720,7 +720,7 @@ public Array add(Object value) throws UnsupportedOperationException {
*
* @deprecated Use add(value) with auto-boxing instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Array addBoolean(boolean value)
throws UnsupportedOperationException {

Expand All @@ -740,7 +740,7 @@ public Array addBoolean(boolean value)
*
* @deprecated Use add(value) with auto-boxing instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Array addInt(int value) throws UnsupportedOperationException {
return add(Integer.valueOf(value));
}
Expand Down
14 changes: 7 additions & 7 deletions src/java/org/rapidcontext/core/data/Dict.java
Original file line number Diff line number Diff line change
Expand Up @@ -403,7 +403,7 @@ public <T> T get(String key, Class<T> clazz) {
*
* @deprecated Use get(key, Object.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Object get(String key, Object defaultValue) {
Object value = get(key);
return (value == null) ? defaultValue : value;
Expand Down Expand Up @@ -449,7 +449,7 @@ public <T> T get(String key, Class<T> clazz, T defaultValue) {
*
* @deprecated Use get(key, String.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public String getString(String key, String defaultValue) {
return get(key, String.class, defaultValue);
}
Expand All @@ -469,7 +469,7 @@ public String getString(String key, String defaultValue) {
*
* @deprecated Use get(key, Boolean.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public boolean getBoolean(String key, boolean defaultValue) {
return get(key, Boolean.class, defaultValue);
}
Expand All @@ -492,7 +492,7 @@ public boolean getBoolean(String key, boolean defaultValue) {
*
* @deprecated Use get(key, Integer.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public int getInt(String key, int defaultValue) {
return get(key, Integer.class, defaultValue);
}
Expand All @@ -515,7 +515,7 @@ public int getInt(String key, int defaultValue) {
*
* @deprecated Use get(key, Date.class, defaultValue) instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Date getDate(String key, Date defaultValue) {
return get(key, Date.class, defaultValue);
}
Expand Down Expand Up @@ -639,7 +639,7 @@ public Dict setIfNull(String key, Supplier<Object> supplier) {
*
* @deprecated Use set(key, value) with auto-boxing instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Dict setBoolean(String key, boolean value)
throws NullPointerException, UnsupportedOperationException {

Expand All @@ -662,7 +662,7 @@ public Dict setBoolean(String key, boolean value)
*
* @deprecated Use set(key, value) with auto-boxing instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public Dict setInt(String key, int value)
throws NullPointerException, UnsupportedOperationException {

Expand Down
14 changes: 7 additions & 7 deletions src/java/org/rapidcontext/core/proc/Library.java
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ public class Library {
* of manually registering here. Storage types are
* automatically managed.
*/
@Deprecated
@Deprecated(forRemoval=true)
public static void registerType(String type, Class<?> cls)
throws ProcedureException {

Expand All @@ -144,7 +144,7 @@ public static void registerType(String type, Class<?> cls)
* of manually registering here. Storage types are
* automatically managed.
*/
@Deprecated
@Deprecated(forRemoval=true)
public static void unregisterType(String type) {
types.remove(type);
LOG.fine("unregistered procedure type " + type);
Expand All @@ -158,7 +158,7 @@ public static void unregisterType(String type) {
* @deprecated Check the storage subtypes to 'type/procedure'
* instead of this.
*/
@Deprecated
@Deprecated(forRemoval=true)
public static String[] getTypes() {
String[] res = new String[types.size()];
types.keySet().toArray(res);
Expand All @@ -178,7 +178,7 @@ public static String[] getTypes() {
* @deprecated Check the storage subtypes to 'type/procedure'
* instead of this.
*/
@Deprecated
@Deprecated(forRemoval=true)
public static Bindings getDefaultBindings(String type) {
try {
AddOnProcedure proc = (AddOnProcedure) types.get(type).getDeclaredConstructor().newInstance();
Expand Down Expand Up @@ -209,7 +209,7 @@ public Library(Storage storage) {
* @deprecated Built-in procedures are managed as storable
* objects, so this method is no longer reliable.
*/
@Deprecated
@Deprecated(forRemoval=true)
public boolean hasBuiltIn(String name) {
return builtIns.containsKey(name);
}
Expand Down Expand Up @@ -285,7 +285,7 @@ public void refreshAliases() {
* @deprecated Built-in procedures should be initialized via the 'className'
* property on a proper stored (serialized) object.
*/
@Deprecated
@Deprecated(forRemoval=true)
public void addBuiltIn(Procedure proc) throws ProcedureException {
if (builtIns.containsKey(proc.getName())) {
String msg = "a procedure '" + proc.getName() + "' already exists";
Expand All @@ -303,7 +303,7 @@ public void addBuiltIn(Procedure proc) throws ProcedureException {
* @deprecated Built-in procedures should be managed as proper stored
* (serialized) objects.
*/
@Deprecated
@Deprecated(forRemoval=true)
public void removeBuiltIn(String name) {
builtIns.remove(name);
}
Expand Down
2 changes: 1 addition & 1 deletion src/java/org/rapidcontext/core/type/Channel.java
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ public void invalidate() {
*
* @deprecated Use {@link #report(long, boolean, String)} instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
public void report(boolean success, String error) {
report(0, success, error);
}
Expand Down
4 changes: 2 additions & 2 deletions src/java/org/rapidcontext/core/type/Procedure.java
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ protected boolean isActive() {
*
* @deprecated Use id() instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
@Override
public String getName() {
return id();
Expand All @@ -134,7 +134,7 @@ public String description() {
*
* @deprecated Use description() instead.
*/
@Deprecated
@Deprecated(forRemoval=true)
@Override
public String getDescription() {
return description();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
*
* @deprecated Use HttpRequestBuiltInProcedure instead (2017-02-01)
*/
@Deprecated
@Deprecated(forRemoval=true)
public class HttpPostBuiltInProcedure extends Procedure {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* @deprecated Use HttpRequestProcedure instead (2017-02-01)
*/
@Deprecated
@Deprecated(forRemoval=true)
public class HttpPostProcedure extends HttpRequestProcedure {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
* @author Per Cederberg
* @version 1.0
*/
@Deprecated
@Deprecated(forRemoval=true)
public class JdbcBuiltInConnectionListProcedure extends Procedure {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
* @author Per Cederberg
* @version 1.0
*/
@Deprecated
@Deprecated(forRemoval=true)
public class JdbcBuiltInConnectionWriteProcedure extends Procedure {

/**
Expand Down

0 comments on commit a7da427

Please sign in to comment.