From 6f44566f0aed259d3f8adfa8ea565c0e244132fb Mon Sep 17 00:00:00 2001 From: Javen O'Neal Date: Mon, 13 Nov 2017 00:51:41 +0000 Subject: [PATCH] bug 61745: remove String#toString() usage found by forbidden apis check git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1815048 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/poi/xwpf/usermodel/TestXWPFChart.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java index e2afbf4cab..b9f2f5a656 100644 --- a/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java +++ b/src/ooxml/testcases/org/apache/poi/xwpf/usermodel/TestXWPFChart.java @@ -67,7 +67,7 @@ public class TestXWPFChart extends TestCase { CTRegularTextRun r = p.addNewR(); r.addNewRPr(); r.setT("XWPF CHART"); - assertEquals("XWPF CHART", chart.getCTChart().getTitle().getTx().getRich().getPArray(0).getRArray(0).getT().toString()); + assertEquals("XWPF CHART", chart.getCTChart().getTitle().getTx().getRich().getPArray(0).getRArray(0).getT()); } /** * test method to check relationship @@ -79,9 +79,9 @@ public class TestXWPFChart extends TestCase { XWPFDocument sampleDoc = XWPFTestDataSamples.openSampleDocument("61745.docx"); List charts = sampleDoc.getCharts(); XWPFChart chart=charts.get(0); - assertEquals(XWPFRelation.CHART.getContentType(), chart.getPackagePart().getContentType().toString()); - assertEquals("/word/document.xml", chart.getParent().getPackagePart().getPartName().toString()); - assertEquals("/word/charts/chart1.xml", chart.getPackagePart().getPartName().toString()); + assertEquals(XWPFRelation.CHART.getContentType(), chart.getPackagePart().getContentType()); + assertEquals("/word/document.xml", chart.getParent().getPackagePart().getPartName()); + assertEquals("/word/charts/chart1.xml", chart.getPackagePart().getPartName()); } } -- 2.39.5