[OpenJDK 2D-Dev] RFR: 8054991 : sun.font.GlyphList uses broken double-checked locking
Phil Race
philip.race at oracle.com
Wed May 25 22:18:22 UTC 2016
bug : https://bugs.openjdk.java.net/browse/JDK-8054991
There is a comment in there about a proposed patch but I can't find it.
However I think this will be sufficient :-
diff --git a/src/java.desktop/share/classes/sun/font/GlyphList.java
b/src/java.desktop/share/classes/sun/font/GlyphList.java
--- a/src/java.desktop/share/classes/sun/font/GlyphList.java
+++ b/src/java.desktop/share/classes/sun/font/GlyphList.java
@@ -152,7 +152,7 @@
* created.
*/
private static GlyphList reusableGL = new GlyphList();
- private static boolean inUse;
+ private static volatile boolean inUse;
-phil.
More information about the 2d-dev
mailing list