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/[EMAIL
PROTECTED]).
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]