aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2012-06-18 14:05:46 +0000
committerVincent Hennebert <vhennebert@apache.org>2012-06-18 14:05:46 +0000
commit4cd3db9c8ef05e5e5c31c847cf9de24e0a9cc452 (patch)
tree4a31c874ba4093126798b0bac11ce642b8ce6ce6
parenteaa8350771d955e817b65258461f581a640deb31 (diff)
downloadxmlgraphics-fop-4cd3db9c8ef05e5e5c31c847cf9de24e0a9cc452.tar.gz
xmlgraphics-fop-4cd3db9c8ef05e5e5c31c847cf9de24e0a9cc452.zip
Fixed FindBugs issue: use String.to(Lower|Upper)Case with Locale.ENGLISH
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript@1351349 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/fonts/EmbeddingMode.java4
-rw-r--r--src/java/org/apache/fop/render/ps/PSFontUtils.java3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fonts/EmbeddingMode.java b/src/java/org/apache/fop/fonts/EmbeddingMode.java
index d75c7a3d4..5a3e905c9 100644
--- a/src/java/org/apache/fop/fonts/EmbeddingMode.java
+++ b/src/java/org/apache/fop/fonts/EmbeddingMode.java
@@ -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);
}
/**
diff --git a/src/java/org/apache/fop/render/ps/PSFontUtils.java b/src/java/org/apache/fop/render/ps/PSFontUtils.java
index c70181cf7..d0d75744f 100644
--- a/src/java/org/apache/fop/render/ps/PSFontUtils.java
+++ b/src/java/org/apache/fop/render/ps/PSFontUtils.java
@@ -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);