]> source.dussan.org Git - poi.git/commitdiff
Fix some Eclipse identified warnings
authorNick Burch <nick@apache.org>
Thu, 24 Apr 2014 15:07:20 +0000 (15:07 +0000)
committerNick Burch <nick@apache.org>
Thu, 24 Apr 2014 15:07:20 +0000 (15:07 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589765 13f79535-47bb-0310-9956-ffa450edef68

src/ooxml/java/org/apache/poi/extractor/ExtractorFactory.java
src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
src/ooxml/java/org/apache/poi/xssf/dev/XSSFDump.java
src/ooxml/java/org/apache/poi/xssf/eventusermodel/ReadOnlySharedStringsTable.java

index 685d92c84529adf8c3d9dff54b2a110c7d067cf8..6c28beb821fba312df423c19f0a3a1b24481acd0 100644 (file)
@@ -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
     {
index 0f9a26fe211ebcf7bf4bd52948091d94ac8659d8..4c3693d3e582f4b690e079cd8916ec9e68410377 100644 (file)
@@ -71,6 +71,7 @@ public class XSLFPowerPointExtractor extends POIXMLTextExtractor {
                        new XSLFPowerPointExtractor(
                                        new XSLFSlideShow(args[0]));
                System.out.println(extractor.getText());
+               extractor.close();
        }
 
        /**
index d1e8ef49b1b8b629e86ee49310c881007f02d9c0..7e449dad36d113933a43801d41867b6384feb48b 100644 (file)
 
 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){
index 8a4b139ff925065b9303eb8738c2e4db5b28a652..a8973dd32e0488504bfe7ff38a78fb29fea277f6 100644 (file)
@@ -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;