diff options
author | Javen O'Neal <onealj@apache.org> | 2017-10-18 08:41:42 +0000 |
---|---|---|
committer | Javen O'Neal <onealj@apache.org> | 2017-10-18 08:41:42 +0000 |
commit | 2ef3af567ce9a248dafb5e1f74bdadc5456f9ab0 (patch) | |
tree | 01a446f138a3d21f74506dd945c0fc8623259e0d /src/java/org/apache/poi/sl | |
parent | b8de369f2c6e388eaf48fbbbcd64eedec8479fc5 (diff) | |
download | poi-2ef3af567ce9a248dafb5e1f74bdadc5456f9ab0.tar.gz poi-2ef3af567ce9a248dafb5e1f74bdadc5456f9ab0.zip |
replace "".equals(string) with string.isEmpty() to avoid null strings silently evaluating to false; most code should probably check string for null if it is not already
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812476 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/poi/sl')
-rw-r--r-- | src/java/org/apache/poi/sl/draw/DrawTextParagraph.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java b/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java index bec5d898f4..e93a3a5fb0 100644 --- a/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java +++ b/src/java/org/apache/poi/sl/draw/DrawTextParagraph.java @@ -257,7 +257,7 @@ public class DrawTextParagraph implements Drawable { fact.fixFonts(graphics); StringBuilder text = new StringBuilder(); AttributedString at = getAttributedString(graphics, text); - boolean emptyParagraph = ("".equals(text.toString().trim())); + boolean emptyParagraph = text.toString().trim().isEmpty(); AttributedCharacterIterator it = at.getIterator(); LineBreakMeasurer measurer = new LineBreakMeasurer(it, graphics.getFontRenderContext()); |