From: Andreas Beeker Date: Fri, 18 Mar 2016 22:21:12 +0000 (+0000) Subject: sonar fix X-Git-Tag: REL_3_15_BETA2~420 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=86fdea9d4befbd85f55a791e43a688e02aaf67c0;p=poi.git sonar fix git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1735696 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java b/src/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java index 565c520e6c..53cd53edc2 100644 --- a/src/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java +++ b/src/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java @@ -43,10 +43,10 @@ public final class Graphics2DDemo { //bar chart data. The first value is the bar color, the second is the width Object[] def = new Object[]{ - Color.yellow, new Integer(40), - Color.green, new Integer(60), - Color.gray, new Integer(30), - Color.red, new Integer(80), + Color.yellow, 40, + Color.green, 60, + Color.gray, 30, + Color.red, 80, }; HSLFSlide slide = ppt.createSlide(); @@ -79,6 +79,7 @@ public final class Graphics2DDemo { FileOutputStream out = new FileOutputStream("hslf-graphics.ppt"); ppt.write(out); out.close(); - } + ppt.close(); + } } diff --git a/src/java/org/apache/poi/ss/formula/eval/ErrorEval.java b/src/java/org/apache/poi/ss/formula/eval/ErrorEval.java index 82a4e9361e..8e119ea036 100644 --- a/src/java/org/apache/poi/ss/formula/eval/ErrorEval.java +++ b/src/java/org/apache/poi/ss/formula/eval/ErrorEval.java @@ -59,7 +59,7 @@ public final class ErrorEval implements ValueEval { if (eval != null) { return eval; } else { - throw new RuntimeException("Unhandled error type " + eval + " for code " + errorCode); + throw new RuntimeException("Unhandled error type for code " + errorCode); } }