aboutsummaryrefslogtreecommitdiffstats
path: root/src/ooxml/java/org/apache
diff options
context:
space:
mode:
authorNick Burch <nick@apache.org>2014-04-24 15:07:20 +0000
committerNick Burch <nick@apache.org>2014-04-24 15:07:20 +0000
commited23692537c54b982a78bd37077bc80658a6737e (patch)
treea6c74148a47178cd9a5e8450e1b1f0c9a87bdaf1 /src/ooxml/java/org/apache
parent55d026a89ec849f6fdd611f7baabcc9e22d146b7 (diff)
downloadpoi-ed23692537c54b982a78bd37077bc80658a6737e.tar.gz
poi-ed23692537c54b982a78bd37077bc80658a6737e.zip
Fix some Eclipse identified warnings
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589765 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/ooxml/java/org/apache')
-rw-r--r--src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java1
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/dev/XSSFDump.java18
-rw-r--r--src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java1
4 files changed, 12 insertions, 9 deletions
diff --git a/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java b/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java
index 685d92c845..6c28beb821 100644
--- a/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java
+++ b/src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java
@@ -200,7 +200,6 @@ public class ExtractorFactory {
* @deprecated Use {@link #createExtractor(DirectoryNode)} instead
*/
@Deprecated
- @SuppressWarnings("unused")
public static POITextExtractor createExtractor(DirectoryNode poifsDir, POIFSFileSystem fs)
throws IOException, InvalidFormatException, OpenXML4JException, XmlException
{
diff --git a/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java b/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
index 0f9a26fe21..4c3693d3e5 100644
--- a/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
+++ b/src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
@@ -71,6 +71,7 @@ public class XSLFPowerPointExtractor extends POIXMLTextExtractor {
new XSLFPowerPointExtractor(
new XSLFSlideShow(args[0]));
System.out.println(extractor.getText());
+ extractor.close();
}
/**
diff --git a/src/ooxml/java/org/apache/poi/xssf/dev/XSSFDump.java b/src/ooxml/java/org/apache/poi/xssf/dev/XSSFDump.java
index d1e8ef49b1..7e449dad36 100644
--- a/src/ooxml/java/org/apache/poi/xssf/dev/XSSFDump.java
+++ b/src/ooxml/java/org/apache/poi/xssf/dev/XSSFDump.java
@@ -17,14 +17,18 @@
package org.apache.poi.xssf.dev;
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStream;
+import java.util.Enumeration;
+import java.util.zip.ZipEntry;
+import java.util.zip.ZipFile;
+
import org.apache.xmlbeans.XmlObject;
import org.apache.xmlbeans.XmlOptions;
-import java.io.*;
-import java.util.zip.ZipFile;
-import java.util.zip.ZipEntry;
-import java.util.Enumeration;
-
/**
* Utility class which dumps the contents of a *.xlsx file into file system.
*
@@ -46,9 +50,9 @@ public final class XSSFDump {
File root = new File(zipname.substring(0, sep));
root.mkdir();
- Enumeration en = zip.entries();
+ Enumeration<? extends ZipEntry> en = zip.entries();
while(en.hasMoreElements()){
- ZipEntry entry = (ZipEntry)en.nextElement();
+ ZipEntry entry = en.nextElement();
String name = entry.getName();
int idx = name.lastIndexOf('/');
if(idx != -1){
diff --git a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
index 8a4b139ff9..a8973dd32e 100644
--- a/src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
+++ b/src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java
@@ -29,7 +29,6 @@ import org.apache.poi.openxml4j.opc.OPCPackage;
import org.apache.poi.openxml4j.opc.PackagePart;
import org.apache.poi.openxml4j.opc.PackageRelationship;
import org.apache.poi.xssf.usermodel.XSSFRelation;
-import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;