RFR: 8274651: Possible race in FontDesignMetrics.KeyReference.dispose

Andrey Turbanov github.com+741251+turbanoff at openjdk.java.net
Fri Oct 1 16:04:50 UTC 2021


Possible race condition could happen if another thread put value into 'metricsCache' by the same key.
We can use `ConcurrentHashMap.remove(key, value)` method to avoid it.

-------------

Commit messages:
 - [PATCH] Fix possible concurrency problem in FontDesignMetrics.KeyReference.dispose method

Changes: https://git.openjdk.java.net/jdk/pull/5753/files
 Webrev: https://webrevs.openjdk.java.net/?repo=jdk&pr=5753&range=00
  Issue: https://bugs.openjdk.java.net/browse/JDK-8274651
  Stats: 9 lines in 1 file changed: 0 ins; 6 del; 3 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5753.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5753/head:pull/5753

PR: https://git.openjdk.java.net/jdk/pull/5753



More information about the client-libs-dev mailing list