[lworld] Document APIs that require Identity objects as parameters

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • repo-valhalla
    • Affects Version/s: repo-valhalla
    • Component/s: core-libs

      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.

            Assignee:
            Roger Riggs
            Reporter:
            Roger Riggs
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: