aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndreas Beeker <kiwiwings@apache.org>2016-12-18 03:47:08 +0000
committerAndreas Beeker <kiwiwings@apache.org>2016-12-18 03:47:08 +0000
commit89699818195ddadb13f5e00961fd87c5d0046cb5 (patch)
tree3b1c2280c1a6be57cdabba0e3bf7f9e7c40c5ebc /src
parent8119f17ed038d388b7da37405dd56ceb9d65d55c (diff)
downloadpoi-89699818195ddadb13f5e00961fd87c5d0046cb5.tar.gz
poi-89699818195ddadb13f5e00961fd87c5d0046cb5.zip
sonarqube fixes - close resources
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1774845 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/dev/PPDrawingTextListing.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/dev/SLWTListing.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/dev/SLWTTextListing.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/dev/SlideAndNotesAtomListing.java6
-rw-r--r--src/scratchpad/src/org/apache/poi/hslf/dev/SlideIdListing.java5
5 files changed, 24 insertions, 5 deletions
diff --git a/src/scratchpad/src/org/apache/poi/hslf/dev/PPDrawingTextListing.java b/src/scratchpad/src/org/apache/poi/hslf/dev/PPDrawingTextListing.java
index af05efa7d5..380f9003bf 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/dev/PPDrawingTextListing.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/dev/PPDrawingTextListing.java
@@ -17,6 +17,8 @@
package org.apache.poi.hslf.dev;
+import java.io.IOException;
+
import org.apache.poi.hslf.record.EscherTextboxWrapper;
import org.apache.poi.hslf.record.PPDrawing;
import org.apache.poi.hslf.record.Record;
@@ -31,7 +33,7 @@ import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl;
* searches those for text. Prints out any text it finds
*/
public final class PPDrawingTextListing {
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws IOException {
if(args.length < 1) {
System.err.println("Need to give a filename");
System.exit(1);
@@ -81,5 +83,7 @@ public final class PPDrawingTextListing {
}
}
}
+
+ ss.close();
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/dev/SLWTListing.java b/src/scratchpad/src/org/apache/poi/hslf/dev/SLWTListing.java
index 90f404b1eb..ff42ce0a45 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/dev/SLWTListing.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/dev/SLWTListing.java
@@ -17,6 +17,8 @@
package org.apache.poi.hslf.dev;
+import java.io.IOException;
+
import org.apache.poi.hslf.record.Document;
import org.apache.poi.hslf.record.Record;
import org.apache.poi.hslf.record.RecordTypes;
@@ -29,7 +31,7 @@ import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl;
* and reports how many, and what sorts of things they contain
*/
public final class SLWTListing {
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws IOException {
if(args.length < 1) {
System.err.println("Need to give a filename");
System.exit(1);
@@ -85,5 +87,7 @@ public final class SLWTListing {
}
}
}
+
+ ss.close();
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/dev/SLWTTextListing.java b/src/scratchpad/src/org/apache/poi/hslf/dev/SLWTTextListing.java
index 5ef5956587..bb53698f7c 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/dev/SLWTTextListing.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/dev/SLWTTextListing.java
@@ -17,6 +17,8 @@
package org.apache.poi.hslf.dev;
+import java.io.IOException;
+
import org.apache.poi.hslf.record.Document;
import org.apache.poi.hslf.record.Record;
import org.apache.poi.hslf.record.SlideListWithText;
@@ -31,7 +33,7 @@ import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl;
* what it finds.
*/
public final class SLWTTextListing {
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws IOException {
if(args.length < 1) {
System.err.println("Need to give a filename");
System.exit(1);
@@ -86,5 +88,7 @@ public final class SLWTTextListing {
}
}
}
+
+ ss.close();
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/dev/SlideAndNotesAtomListing.java b/src/scratchpad/src/org/apache/poi/hslf/dev/SlideAndNotesAtomListing.java
index bc571008e2..711f4ad6f5 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/dev/SlideAndNotesAtomListing.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/dev/SlideAndNotesAtomListing.java
@@ -17,6 +17,8 @@
package org.apache.poi.hslf.dev;
+import java.io.IOException;
+
import org.apache.poi.hslf.record.Notes;
import org.apache.poi.hslf.record.NotesAtom;
import org.apache.poi.hslf.record.Record;
@@ -32,7 +34,7 @@ import org.apache.poi.hslf.usermodel.HSLFSlideShowImpl;
* Slides, Master Slides and Notes
*/
public final class SlideAndNotesAtomListing {
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws IOException {
if(args.length < 1) {
System.err.println("Need to give a filename");
System.exit(1);
@@ -63,5 +65,7 @@ public final class SlideAndNotesAtomListing {
System.out.println("");
}
}
+
+ ss.close();
}
}
diff --git a/src/scratchpad/src/org/apache/poi/hslf/dev/SlideIdListing.java b/src/scratchpad/src/org/apache/poi/hslf/dev/SlideIdListing.java
index 1398175f42..b492f4bda5 100644
--- a/src/scratchpad/src/org/apache/poi/hslf/dev/SlideIdListing.java
+++ b/src/scratchpad/src/org/apache/poi/hslf/dev/SlideIdListing.java
@@ -18,6 +18,7 @@
package org.apache.poi.hslf.dev;
import java.io.ByteArrayOutputStream;
+import java.io.IOException;
import java.util.Map;
import org.apache.poi.hslf.record.Document;
@@ -42,7 +43,7 @@ import org.apache.poi.util.LittleEndian;
public final class SlideIdListing {
private static byte[] fileContents;
- public static void main(String[] args) throws Exception {
+ public static void main(String[] args) throws IOException {
if(args.length < 1) {
System.err.println("Need to give a filename");
System.exit(1);
@@ -154,6 +155,8 @@ public final class SlideIdListing {
pos += baos.size();
}
+ ss.close();
+
System.out.println("");
}