Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8203327

Small cleanups in java.lang.ref

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 11
    • Component/s: core-libs
    • Labels:
      None
    • Subcomponent:
    • Resolved In Build:
      b16

      Backports

        Description

        ReferenceQueue has 3 fields that should be made final.

        Class Null doesn't need to be generic

        - private static class Null<S> extends ReferenceQueue<S> {
        - boolean enqueue(Reference<? extends S> r) {
        + private static class Null extends ReferenceQueue<Object> {
        + boolean enqueue(Reference<?> r) {

        Reference fields are documented as being NULL, but they are actually null

        - /* When active: NULL
        + /* When active: null

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                martin Martin Buchholz
                Reporter:
                martin Martin Buchholz
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: