diff --git a/platform/util/troveCompileOnly/src/gnu/trove/Equality.java b/platform/util/troveCompileOnly/src/gnu/trove/Equality.java index 4b473b9827d2..4a059547be5e 100644 --- a/platform/util/troveCompileOnly/src/gnu/trove/Equality.java +++ b/platform/util/troveCompileOnly/src/gnu/trove/Equality.java @@ -8,6 +8,11 @@ import java.lang.reflect.Method; import java.lang.reflect.Proxy; import java.util.Objects; +/** + * @deprecated This class is used to support the old Kotlin JPS plugin (1.6.*) bundled in Spring 2.* + * Please don't use it in your code and don't remove (KTIJ-29067) + */ +@Deprecated @ApiStatus.Internal public interface Equality { boolean equals(T o1, T o2); @@ -17,7 +22,7 @@ public interface Equality { @SuppressWarnings("unchecked") static Equality createIdentityEquality() { - return (Equality) Proxy.newProxyInstance( + return (Equality)Proxy.newProxyInstance( Equality.class.getClassLoader(), new Class[]{Equality.class}, new InvocationHandler() { @@ -34,7 +39,7 @@ public interface Equality { @SuppressWarnings("unchecked") static Equality createCanonicalEquality() { - return (Equality) Proxy.newProxyInstance( + return (Equality)Proxy.newProxyInstance( Equality.class.getClassLoader(), new Class[]{Equality.class}, new InvocationHandler() { diff --git a/platform/util/troveCompileOnly/src/gnu/trove/TObjectHashingStrategy.java b/platform/util/troveCompileOnly/src/gnu/trove/TObjectHashingStrategy.java index 3e9aaf1f5e28..d7f936d528bb 100644 --- a/platform/util/troveCompileOnly/src/gnu/trove/TObjectHashingStrategy.java +++ b/platform/util/troveCompileOnly/src/gnu/trove/TObjectHashingStrategy.java @@ -8,9 +8,15 @@ import java.lang.reflect.InvocationHandler; import java.lang.reflect.Method; import java.lang.reflect.Proxy; +/** + * @deprecated This class is used to support the old Kotlin JPS plugin (1.6.*) bundled in Spring 2.* + * Please don't use it in your code and don't remove (KTIJ-29067) + */ +@Deprecated @ApiStatus.Internal public interface TObjectHashingStrategy extends Serializable { int computeHashCode(T object); + boolean equals(T o1, T o2); TObjectHashingStrategy IDENTITY = createIdentityStrategy(); @@ -18,7 +24,7 @@ public interface TObjectHashingStrategy extends Serializable { @SuppressWarnings("unchecked") static TObjectHashingStrategy createIdentityStrategy() { - return (TObjectHashingStrategy) Proxy.newProxyInstance( + return (TObjectHashingStrategy)Proxy.newProxyInstance( TObjectHashingStrategy.class.getClassLoader(), new Class[]{TObjectHashingStrategy.class}, new InvocationHandler() { @@ -26,7 +32,8 @@ public interface TObjectHashingStrategy extends Serializable { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ("computeHashCode".equals(method.getName())) { return System.identityHashCode(args[0]); - } else if ("equals".equals(method.getName())) { + } + else if ("equals".equals(method.getName())) { return args[0] == args[1]; } throw new UnsupportedOperationException("Unsupported method: " + method.getName()); @@ -37,7 +44,7 @@ public interface TObjectHashingStrategy extends Serializable { @SuppressWarnings("unchecked") static TObjectHashingStrategy createCanonicalStrategy() { - return (TObjectHashingStrategy) Proxy.newProxyInstance( + return (TObjectHashingStrategy)Proxy.newProxyInstance( TObjectHashingStrategy.class.getClassLoader(), new Class[]{TObjectHashingStrategy.class}, new InvocationHandler() { @@ -45,7 +52,8 @@ public interface TObjectHashingStrategy extends Serializable { public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if ("computeHashCode".equals(method.getName())) { return args[0] != null ? args[0].hashCode() : 0; - } else if ("equals".equals(method.getName())) { + } + else if ("equals".equals(method.getName())) { if (args[0] == null) { return args[1] == null; }