Fix NPE in Html.inParagraph()
The typeface in a TypefaceSpan can be the null string. This patch fixes the string comparison to not throw a NullPointerException. Bug: 20849738 Change-Id: Ied049305794966bcbca00cfd11fe97a91b685d79
This commit is contained in:
@@ -278,7 +278,7 @@ public class Html {
|
||||
if (style[j] instanceof TypefaceSpan) {
|
||||
String s = ((TypefaceSpan) style[j]).getFamily();
|
||||
|
||||
if (s.equals("monospace")) {
|
||||
if ("monospace".equals(s)) {
|
||||
out.append("<tt>");
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user