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

    • Type: Sub-task
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: repo-valhalla
    • Component/s: core-libs
    • Labels:

      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

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

                Dates

                Created:
                Updated:
                Resolved: