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

ObjectStreamClass: hide 'final' flag for anonymous classes

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
      None

      Description

      Anonymous inner classes are supposed to be marked ACC_FINAL, but have not been for many years. See JDK-8129576.

      The main reason the compiler behavior has not been fixed is due to concern that doing so will change the serialization UIDs for all anonymous classes, and this is an unnecessary incompatible change.

      After discussion, the proposal is to modify the serialization spec, and its implementation in ObjectStreamClass, so that the flags for anonymous classes (per Class.isAnonymousClass) always exclude ACC_FINAL, regardless of its actual setting. This will allow compiler behavior to be corrected without perturbing UIDs.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dlsmith Dan Smith
                Reporter:
                dlsmith Dan Smith
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: