pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1828267 - /pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java
Date Tue, 03 Apr 2018 18:03:25 GMT
Author: tilman
Date: Tue Apr  3 18:03:25 2018
New Revision: 1828267

URL: http://svn.apache.org/viewvc?rev=1828267&view=rev
Log:
PDFBOX-4181: use ConcurrentHashMap instead of HashMap because of concurrent writing, as suggested
by Michael Klink

Modified:
    pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java

Modified: pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java?rev=1828267&r1=1828266&r2=1828267&view=diff
==============================================================================
--- pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java
(original)
+++ pdfbox/branches/2.0/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/font/encoding/GlyphList.java
Tue Apr  3 18:03:25 2018
@@ -25,6 +25,7 @@ import org.apache.commons.logging.LogFac
 import java.io.IOException;
 import java.util.HashMap;
 import java.util.Map;
+import java.util.concurrent.ConcurrentHashMap;
 
 /**
  * PostScript glyph list, maps glyph names to sequences of Unicode characters.
@@ -96,7 +97,7 @@ public final class GlyphList
     private final Map<String, String> unicodeToName;
     
     // additional read/write cache for uniXXXX names
-    private final Map<String, String> uniNameToUnicodeCache = new HashMap<String,
String>();
+    private final Map<String, String> uniNameToUnicodeCache = new ConcurrentHashMap<String,
String>();
 
     /**
      * Creates a new GlyphList from a glyph list file.



Mime
View raw message