-
Bug
-
Resolution: Unresolved
-
P4
-
repo-valhalla
There are a number of APIs that require identity objects as arguments.
The would include any that pass an object for which a java.lang.Reference might be used to refer to the argument. For example, WeakHashmap, or the Cleaner, or WeakReference, SoftReference.
APIs that restrict their arguments to identity objects should document the requirement in the package, or class documentation and include \@throws IdentityException where appropriate.
The implementations should use `java.util.Objects.requireIdentity(obj, msg)` to check the arguments and throw an appropriate exception.
The would include any that pass an object for which a java.lang.Reference might be used to refer to the argument. For example, WeakHashmap, or the Cleaner, or WeakReference, SoftReference.
APIs that restrict their arguments to identity objects should document the requirement in the package, or class documentation and include \@throws IdentityException where appropriate.
The implementations should use `java.util.Objects.requireIdentity(obj, msg)` to check the arguments and throw an appropriate exception.