Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8252181 [JEP 390] Define & apply annotation jdk.internal.ValueBased
  3. JDK-8253962

Add @ValueBased to unmodifable Collection implementation classes

    XMLWordPrintable

Details

    • Sub-task
    • Status: Resolved
    • P4
    • Resolution: Fixed
    • None
    • repo-valhalla
    • core-libs

    Description

      Add @ValueBased to the collection factories in java.util and their implementation classes: List.of, List.copyOf, Set.of, Set.copyOf, Map.of, Map.copyOf, Map.ofEntries, and Map.entry.

      Adding the @ValueBased annotation will enable warnings to understand the scope of any issues related to assumptions about identity in Collection classes.

      Attachments

        Issue Links

          Activity

            People

              rriggs Roger Riggs
              rriggs Roger Riggs
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: