]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fixed FindBugs issue: use String.to(Lower|Upper)Case with Locale.ENGLISH
authorVincent Hennebert <vhennebert@apache.org>
Mon, 18 Jun 2012 14:05:46 +0000 (14:05 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Mon, 18 Jun 2012 14:05:46 +0000 (14:05 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript@1351349 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/EmbeddingMode.java
src/java/org/apache/fop/render/ps/PSFontUtils.java

index d75c7a3d48a4f8dc23b9d5b499f3ccd487a728a1..5a3e905c9d0bc43dd38d15fcfe41009b274fc229 100644 (file)
@@ -19,6 +19,8 @@
 
 package org.apache.fop.fonts;
 
+import java.util.Locale;
+
 /**
  * This enumerates the embedding mode of fonts; full; subset; auto (auto defaults to full for
  * Type 1 fonts and subset for TrueType fonts.
@@ -37,7 +39,7 @@ public enum EmbeddingMode {
      * @return the name of this embedding mode in lower case.
      */
     public String getName() {
-        return this.toString().toLowerCase();
+        return this.toString().toLowerCase(Locale.ENGLISH);
     }
 
     /**
index c70181cf7ba1146fad3cbd6bc309e8c4657c1344..d0d75744f4b6959a48ad992b6e28c1bfa167e6de 100644 (file)
@@ -25,6 +25,7 @@ import java.io.InputStream;
 import java.net.MalformedURLException;
 import java.util.HashMap;
 import java.util.HashSet;
+import java.util.Locale;
 import java.util.Map;
 import java.util.Set;
 
@@ -374,7 +375,7 @@ public class PSFontUtils extends org.apache.xmlgraphics.ps.PSFontUtils {
                     char ch16 = (char)ch; //TODO Handle Unicode characters beyond 16bit
                     String glyphName = Glyphs.charToGlyphName(ch16);
                     if ("".equals(glyphName)) {
-                        glyphName = "u" + Integer.toHexString(ch).toUpperCase();
+                        glyphName = "u" + Integer.toHexString(ch).toUpperCase(Locale.ENGLISH);
                     }
                     writeGlyphDefs(gen, glyphName, glyphIndex);