Browse Source

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
tags/fop-1_1rc1^2
Vincent Hennebert 12 years ago
parent
commit
4cd3db9c8e

+ 3
- 1
src/java/org/apache/fop/fonts/EmbeddingMode.java View 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);
}

/**

+ 2
- 1
src/java/org/apache/fop/render/ps/PSFontUtils.java View 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);


Loading…
Cancel
Save