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

Modernize ConcurrentHashMap

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Won't Fix
    • Icon: P5 P5
    • None
    • None
    • core-libs
    • None

      java.util.concurrent.ConcurrentHashMap is relatively old and has not been updated to reflect the current state of Java and can be modernized:

      * Add `@Serial` annotations
      * Seal classes and restrict subclassing for internal classes
      * Use pattern matching for instance
      * Remove redundant modifiers (such as some final declarations)
      * Use Objects.requireNonNull for invariant checking
      * Use diamond operators instead of explicit types
      * Simplify expressions using Math::max

            vklang Viktor Klang
            pminborg Per-Ake Minborg
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: