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

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

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 16
    • 15
    • core-libs
    • b28

    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

          There are no Sub-Tasks for this issue.

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: