8134986: Incorrect use of ConcurrentHashMap.contains in SunFontManager.java
authorprr
Thu, 14 Apr 2016 12:36:14 -0700
changeset 37689 c69dbc15e4bd
parent 37688 e5cd9e00a669
child 37690 0e619f348ff7
8134986: Incorrect use of ConcurrentHashMap.contains in SunFontManager.java Reviewed-by: serb, jgodinez
jdk/src/java.desktop/share/classes/sun/font/SunFontManager.java
--- a/jdk/src/java.desktop/share/classes/sun/font/SunFontManager.java	Thu Apr 14 20:32:50 2016 +0300
+++ b/jdk/src/java.desktop/share/classes/sun/font/SunFontManager.java	Thu Apr 14 12:36:14 2016 -0700
@@ -1843,7 +1843,7 @@
 
     private PhysicalFont registerFontFile(String file) {
         if (new File(file).isAbsolute() &&
-            !registeredFonts.contains(file)) {
+            !registeredFonts.containsKey(file)) {
             int fontFormat = FONTFORMAT_NONE;
             int fontRank = Font2D.UNKNOWN_RANK;
             if (ttFilter.accept(null, file)) {