diff options
author | Vincent Hennebert <vhennebert@apache.org> | 2012-06-18 14:06:12 +0000 |
---|---|---|
committer | Vincent Hennebert <vhennebert@apache.org> | 2012-06-18 14:06:12 +0000 |
commit | cc0a25b5405e3fe7aed441d86fb40b25852b1560 (patch) | |
tree | 40bd2f48c8408f0a5ce83856c11adae2e3c29102 | |
parent | 4cd3db9c8ef05e5e5c31c847cf9de24e0a9cc452 (diff) | |
download | xmlgraphics-fop-cc0a25b5405e3fe7aed441d86fb40b25852b1560.tar.gz xmlgraphics-fop-cc0a25b5405e3fe7aed441d86fb40b25852b1560.zip |
Fixed FindBugs issue: do not compare strings with == or !=
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript@1351350 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java b/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java index 8f0744d50..1410239ee 100644 --- a/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java +++ b/src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java @@ -199,10 +199,10 @@ public class TTFFontLoader extends FontLoader { if (codePoint <= 0) { int glyphIndex = segment.getGlyphStartIndex() + u - segment.getUnicodeStart(); String glyphName = ttf.getGlyphName(glyphIndex); - if (glyphName == "" && ttf.getPostScriptVersion() != PostScriptVersion.V2) { + if (glyphName.length() == 0 && ttf.getPostScriptVersion() != PostScriptVersion.V2) { glyphName = "u" + HexEncoder.encode(u); } - if (glyphName != "") { + if (glyphName.length() > 0) { String unicode = Character.toString(u); NamedCharacter nc = new NamedCharacter(glyphName, unicode); singleFont.addUnencodedCharacter(nc, wx[glyphIndex]); |