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

[JEP 390] Revise "value-based class" & apply to wrappers

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 15
    • Fix Version/s: 16
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      master

      Description

      Update ValueBased.html to reflect the JEP's constraints on inline class migration:

       - Is `final`,

        - Declares only `final` instance fields,

        - Extends `Object`, or a hierarchy of abstract classes that declare no instance
          fields and have no instance initialization logic,

        - Declares only `private` constructors, or has deprecated its constructors for
          removal,

        - Does not promise a unique instance will be created with each factory method
          invocation (or any other instance creation mechanism),

        - Does not rely upon or expose object identity through any of its methods,

        - Overrides `toString`, `equals`, and `hashCode`, and

        - Declares no `synchronized` methods, and discourages clients from performing
          synchronization.

      Update the specs of the 8 primitive wrapper classes (Boolean, Character, Byte, Short, Integer, Long, Float, Double) to indicate that they are value-based classes.

      No longer designate subclasses of ConstantDesc as value-based, because most of these classes declare their own fields.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: