From e1571c913007cf3b9b8fa0991b58ecfa9973bafa Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 15 Oct 2017 20:34:10 +0000 Subject: [PATCH] Remove unnecessary toString calls [thanks to Kui Liu]. This close #79. git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1812233 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java | 2 +- src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ooxml/java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java b/src/ooxml/java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java index 5f474fc73..be96d8761 100644 --- a/src/ooxml/java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java +++ b/src/ooxml/java/org/apache/poi/xdgf/extractor/XDGFVisioExtractor.java @@ -48,7 +48,7 @@ public class XDGFVisioExtractor extends POIXMLTextExtractor { page.getContent().visitShapes(visitor); } - return visitor.getText().toString(); + return visitor.getText(); } public static void main(String [] args) throws IOException { diff --git a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java index dfcbe56c5..e7ced6239 100644 --- a/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java +++ b/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFParagraph.java @@ -352,7 +352,7 @@ public class XWPFParagraph implements IBodyElement, IRunBody, ISDTContents, Para } if (level != null && level.getLvlText() != null && level.getLvlText().getVal() != null) { - return level.getLvlText().getVal().toString(); + return level.getLvlText().getVal(); } } }