Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8249100 JEP 390: Warnings for Value-Based Classes
  3. JDK-8262495

Release Note: JEP 390: Warnings for Value-based Classes

    XMLWordPrintable

    Details

      Description

      Users of the _value-based classes_ provided by the standard libraries—notably including users of the primitive wrapper classes—should avoid relying on the identity of class instances. Programmers are strongly discouraged from calling the wrapper class constructors, which are now deprecated for removal. New `javac` warnings discourage synchronization on value-based class instances. Runtime warnings about synchronization can also be activated, using command-line option `-XX:DiagnoseSyncOnValueBasedClasses`.

      For further details, see [JEP 390](https://openjdk.java.net/jeps/390).

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved: