]> source.dussan.org Git - poi.git/commitdiff
sonar fix
authorAndreas Beeker <kiwiwings@apache.org>
Fri, 18 Mar 2016 22:21:12 +0000 (22:21 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Fri, 18 Mar 2016 22:21:12 +0000 (22:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1735696 13f79535-47bb-0310-9956-ffa450edef68

src/examples/src/org/apache/poi/hslf/examples/Graphics2DDemo.java
src/java/org/apache/poi/ss/formula/eval/ErrorEval.java

index 565c520e6c8f19cfcb415f126de09054b8b57ec6..53cd53edc28e67e0b507793bde0e6cf500d83a18 100644 (file)
@@ -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();
+    }
 }
index 82a4e9361e32023e708649a47bc56193784a9b83..8e119ea03610befc5b0d679338b05eadd878a534 100644 (file)
@@ -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);
         }
     }