RFR: 8299852: Modernize ConcurrentHashMap
Per Minborg
pminborg at openjdk.org
Tue Jan 10 10:40:57 UTC 2023
`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
-------------
Commit messages:
- Untrack file
- Modernize ConcurrentHashMap
Changes: https://git.openjdk.org/jdk/pull/11924/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11924&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8299852
Stats: 385 lines in 1 file changed: 14 ins; 22 del; 349 mod
Patch: https://git.openjdk.org/jdk/pull/11924.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11924/head:pull/11924
PR: https://git.openjdk.org/jdk/pull/11924
More information about the core-libs-dev
mailing list