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(); } } }