]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fixed FindBugs issue: do not compare strings with == or !=
authorVincent Hennebert <vhennebert@apache.org>
Mon, 18 Jun 2012 14:06:12 +0000 (14:06 +0000)
committerVincent Hennebert <vhennebert@apache.org>
Mon, 18 Jun 2012 14:06:12 +0000 (14:06 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_TrueTypeInPostScript@1351350 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java

index 8f0744d50ab4455479ba7d9b6e7f8bc32229044d..1410239eeffd34a87d39dd50095f64abdf87da6d 100644 (file)
@@ -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]);