From 4cd3db9c8ef05e5e5c31c847cf9de24e0a9cc452 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Mon, 18 Jun 2012 14:05:46 +0000 Subject: 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 --- src/java/org/apache/fop/fonts/EmbeddingMode.java | 4 +++- src/java/org/apache/fop/render/ps/PSFontUtils.java | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'src/java/org/apache') 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); -- cgit v1.2.3