aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/poi/sl
diff options
context:
space:
mode:
authorJaven O'Neal <onealj@apache.org>2017-10-18 08:41:42 +0000
committerJaven O'Neal <onealj@apache.org>2017-10-18 08:41:42 +0000
commit2ef3af567ce9a248dafb5e1f74bdadc5456f9ab0 (patch)
tree01a446f138a3d21f74506dd945c0fc8623259e0d /src/java/org/apache/poi/sl
parentb8de369f2c6e388eaf48fbbbcd64eedec8479fc5 (diff)
downloadpoi-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.java2
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());