]> source.dussan.org Git - poi.git/commitdiff
Eclipse warnings, typos, ...
authorDominik Stadler <centic@apache.org>
Sun, 8 Nov 2015 10:00:24 +0000 (10:00 +0000)
committerDominik Stadler <centic@apache.org>
Sun, 8 Nov 2015 10:00:24 +0000 (10:00 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1713216 13f79535-47bb-0310-9956-ffa450edef68

src/examples/src/org/apache/poi/xssf/usermodel/examples/BigGridDemo.java
src/java/org/apache/poi/ss/formula/eval/FunctionEval.java
src/ooxml/java/org/apache/poi/xssf/extractor/XSSFExcelExtractor.java
src/ooxml/java/org/apache/poi/xssf/model/SharedStringsTable.java
src/ooxml/java/org/apache/poi/xssf/model/StylesTable.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java
src/testcases/org/apache/poi/ss/formula/TestWorkbookEvaluator.java

index e2b03711cf35887a8e3d6e3af2a7acd4b2ef99c5..2239122e1b242ee7213e4b27320f00e39f7de3a1 100644 (file)
@@ -174,21 +174,19 @@ public class BigGridDemo {
      * @param entry the name of the sheet entry to substitute, e.g. xl/worksheets/sheet1.xml
      * @param out the stream to write the result to
      */
-       private static void substitute(File zipfile, File tmpfile, String entry, OutputStream out) throws IOException {
+    private static void substitute(File zipfile, File tmpfile, String entry, OutputStream out) throws IOException {
         ZipFile zip = ZipHelper.openZipFile(zipfile);
-
         try {
-                       ZipOutputStream zos = new ZipOutputStream(out);
-
-                       @SuppressWarnings("unchecked")
-                       Enumeration<ZipEntry> en = (Enumeration<ZipEntry>) zip.entries();
-                       while (en.hasMoreElements()) {
-                               ZipEntry ze = en.nextElement();
-                               if(!ze.getName().equals(entry)){
-                                       zos.putNextEntry(new ZipEntry(ze.getName()));
-                                       InputStream is = zip.getInputStream(ze);
-                                       copyStream(is, zos);
-                                       is.close();
+            ZipOutputStream zos = new ZipOutputStream(out);
+    
+            Enumeration<? extends ZipEntry> en = zip.entries();
+            while (en.hasMoreElements()) {
+                ZipEntry ze = en.nextElement();
+                if(!ze.getName().equals(entry)){
+                    zos.putNextEntry(new ZipEntry(ze.getName()));
+                    InputStream is = zip.getInputStream(ze);
+                    copyStream(is, zos);
+                    is.close();
                 }
             }
             zos.putNextEntry(new ZipEntry(entry));
@@ -198,7 +196,7 @@ public class BigGridDemo {
     
             zos.close();
         } finally {
-               zip.close();
+            zip.close();
         }
     }
 
index c64afbd55fc025bfe97510c0d29874d5d16bd4c4..27f0591a9568121feae6461f9d15bb3879778643 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.poi.ss.formula.functions.*;
 
 /**
  * Mappings from the Excel functions to our evaluation implementations
- *  (where avilable)
+ *  (where available)
  */
 public final class FunctionEval {
     /**
index c66ad71b376d480ca7056bd7b9f8683bdc7dcd13..f9f7c23da388139e8ee07531e4936b64cd94a885 100644 (file)
@@ -129,7 +129,7 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor
 
 
     /**
-     * Retreives the text contents of the file
+     * Retrieves the text contents of the file
      */
     public String getText() {
         DataFormatter formatter;
@@ -194,8 +194,9 @@ public class XSSFExcelExtractor extends POIXMLTextExtractor
                         text.append(" Comment by ").append(comment.getAuthor()).append(": ").append(commentText);
                     }
 
-                    if(ri.hasNext())
+                    if(ri.hasNext()) {
                         text.append("\t");
+                    }
                 }
                 text.append("\n");
             }
index f88172b02338ac2514dc272c26f00580162a87ea..7f56448795bd9530fe6348a650a4833dc1675c2e 100644 (file)
@@ -29,7 +29,6 @@ import java.util.Map;
 import org.apache.poi.POIXMLDocumentPart;
 import org.apache.poi.openxml4j.opc.PackagePart;
 import org.apache.poi.openxml4j.opc.PackageRelationship;
-import org.apache.poi.util.DocumentHelper;
 import org.apache.xmlbeans.XmlException;
 import org.apache.xmlbeans.XmlOptions;
 import org.openxmlformats.schemas.spreadsheetml.x2006.main.CTRst;
index aec46b5aba308d527fd72c90b5050e62d95bc5eb..be3855a06753eebc1c15e347c946c676fb5bc125 100644 (file)
@@ -34,7 +34,6 @@ import org.apache.poi.ss.SpreadsheetVersion;
 import org.apache.poi.ss.usermodel.BuiltinFormats;
 import org.apache.poi.ss.usermodel.FontFamily;
 import org.apache.poi.ss.usermodel.FontScheme;
-import org.apache.poi.util.DocumentHelper;
 import org.apache.poi.xssf.usermodel.XSSFCellStyle;
 import org.apache.poi.xssf.usermodel.XSSFFactory;
 import org.apache.poi.xssf.usermodel.XSSFFont;
index a9a277fc2fbd8921aa927ff1467984ae61496594..dc2d8307ef812eb486b2b9ce1bd27e73b0a98494 100644 (file)
@@ -64,7 +64,6 @@ import org.apache.poi.ss.util.CellRangeAddress;
 import org.apache.poi.ss.util.CellReference;
 import org.apache.poi.ss.util.WorkbookUtil;
 import org.apache.poi.util.Beta;
-import org.apache.poi.util.DocumentHelper;
 import org.apache.poi.util.IOUtils;
 import org.apache.poi.util.Internal;
 import org.apache.poi.util.POILogFactory;
index 219d04e40b22f40de139f92f644fb4ca52ce2469..6afcc445e37738a5d8abcba3673efd590b1fed61 100644 (file)
@@ -23,10 +23,17 @@ import static org.junit.Assert.fail;
 
 import java.io.IOException;
 
-import org.junit.Ignore;
-import org.junit.Test;
-
 import org.apache.poi.hssf.HSSFTestDataSamples;
+import org.apache.poi.hssf.usermodel.HSSFCell;
+import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
+import org.apache.poi.hssf.usermodel.HSSFRow;
+import org.apache.poi.hssf.usermodel.HSSFSheet;
+import org.apache.poi.hssf.usermodel.HSSFWorkbook;
+import org.apache.poi.ss.formula.eval.BlankEval;
+import org.apache.poi.ss.formula.eval.ErrorEval;
+import org.apache.poi.ss.formula.eval.MissingArgEval;
+import org.apache.poi.ss.formula.eval.NumberEval;
+import org.apache.poi.ss.formula.eval.ValueEval;
 import org.apache.poi.ss.formula.ptg.AreaErrPtg;
 import org.apache.poi.ss.formula.ptg.AttrPtg;
 import org.apache.poi.ss.formula.ptg.DeletedArea3DPtg;
@@ -34,16 +41,6 @@ import org.apache.poi.ss.formula.ptg.DeletedRef3DPtg;
 import org.apache.poi.ss.formula.ptg.IntPtg;
 import org.apache.poi.ss.formula.ptg.Ptg;
 import org.apache.poi.ss.formula.ptg.RefErrorPtg;
-import org.apache.poi.ss.formula.eval.BlankEval;
-import org.apache.poi.ss.formula.eval.ErrorEval;
-import org.apache.poi.ss.formula.eval.MissingArgEval;
-import org.apache.poi.ss.formula.eval.NumberEval;
-import org.apache.poi.ss.formula.eval.ValueEval;
-import org.apache.poi.hssf.usermodel.HSSFCell;
-import org.apache.poi.hssf.usermodel.HSSFFormulaEvaluator;
-import org.apache.poi.hssf.usermodel.HSSFRow;
-import org.apache.poi.hssf.usermodel.HSSFSheet;
-import org.apache.poi.hssf.usermodel.HSSFWorkbook;
 import org.apache.poi.ss.usermodel.Cell;
 import org.apache.poi.ss.usermodel.CellValue;
 import org.apache.poi.ss.usermodel.FormulaEvaluator;
@@ -51,6 +48,8 @@ import org.apache.poi.ss.usermodel.Name;
 import org.apache.poi.ss.usermodel.Row;
 import org.apache.poi.ss.usermodel.Sheet;
 import org.apache.poi.ss.usermodel.Workbook;
+import org.junit.Ignore;
+import org.junit.Test;
 
 /**
  * Tests {@link WorkbookEvaluator}.