You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by ac...@apache.org on 2008/07/22 11:30:24 UTC

svn commit: r678691 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java

Author: acumiskey
Date: Tue Jul 22 02:30:22 2008
New Revision: 678691

URL: http://svn.apache.org/viewvc?rev=678691&view=rev
Log:
Desynchronized createFontKey() and removed single use of static TRIPLETS_TYPE in fontLookup() following a suggestion by Jeremias Ingo Maas' threading issue (http://mail-archives.apache.org/mod_mbox/xmlgraphics-fop-users/200807.mbox/%3C000a01c8eb4b$42166e60$a701010a@ebp01422%3E).

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java?rev=678691&r1=678690&r2=678691&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fonts/FontInfo.java Tue Jul 22 02:30:22 2008
@@ -40,8 +40,6 @@
  */
 public class FontInfo {
 
-    private static final FontTriplet[] TRIPLETS_TYPE = new FontTriplet[1];
-
     /** logging instance */
     protected static Log log = LogFactory.getLog(FontInfo.class);
 
@@ -399,9 +397,11 @@
                         + "FontTriplet on the last call. Lookup: " + sb.toString());
             
         }
-
+        FontTriplet[] fontTriplets = new FontTriplet[matchedTriplets.size()];
+        matchedTriplets.toArray(fontTriplets);
+        
         // found some matching fonts so return them
-        return (FontTriplet[]) matchedTriplets.toArray(TRIPLETS_TYPE);
+        return fontTriplets; 
     }
 
     private Set/*<FontTriplet>*/ getLoggedFontKeys() {
@@ -504,7 +504,7 @@
      * @param weight font weight
      * @return internal key
      */
-    public static synchronized FontTriplet createFontKey(String family, String style,
+    public static FontTriplet createFontKey(String family, String style,
                                        int weight) {
         return new FontTriplet(family, style, weight);
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org