From cc0a25b5405e3fe7aed441d86fb40b25852b1560 Mon Sep 17 00:00:00 2001 From: Vincent Hennebert Date: Mon, 18 Jun 2012 14:06:12 +0000 Subject: [PATCH] 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 --- src/java/org/apache/fop/fonts/truetype/TTFFontLoader.java | 4 ++-- 1 file 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]); -- 2.39.5