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

Configuration::reads can use Set.copyOf

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 13
    • Fix Version/s: 13
    • Component/s: core-libs

      Description

      Configuration::reads wrap already immutable Sets in unmodifiableSet, causing excess wrapping and indirection that is detectable in startup profiles. Using Set.copyOf or otherwise ensuring the returned value is guaranteed to be an unmodifiable is a small optimization.

        Attachments

          Activity

            People

            • Assignee:
              redestad Claes Redestad
              Reporter:
              redestad Claes Redestad
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: