]> source.dussan.org Git - poi.git/commitdiff
Remove unnecessary initialization of members
authorDominik Stadler <centic@apache.org>
Sat, 16 Sep 2017 08:22:59 +0000 (08:22 +0000)
committerDominik Stadler <centic@apache.org>
Sat, 16 Sep 2017 08:22:59 +0000 (08:22 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1808510 13f79535-47bb-0310-9956-ffa450edef68

165 files changed:
src/examples/src/org/apache/poi/hssf/usermodel/examples/AddDimensionedImage.java
src/examples/src/org/apache/poi/hssf/usermodel/examples/InCellLists.java
src/examples/src/org/apache/poi/hssf/view/SVBorder.java
src/examples/src/org/apache/poi/hssf/view/SVTableCellRenderer.java
src/examples/src/org/apache/poi/hssf/view/SVTableModel.java
src/examples/src/org/apache/poi/hssf/view/SViewer.java
src/examples/src/org/apache/poi/ss/examples/AddDimensionedImage.java
src/examples/src/org/apache/poi/ss/examples/ToCSV.java
src/examples/src/org/apache/poi/xssf/eventusermodel/XLSX2CSV.java
src/examples/src/org/apache/poi/xwpf/usermodel/examples/UpdateEmbeddedDoc.java
src/excelant/java/org/apache/poi/ss/excelant/ExcelAntEvaluateCell.java
src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTask.java
src/excelant/java/org/apache/poi/ss/excelant/ExcelAntTest.java
src/excelant/testcases/org/apache/poi/ss/excelant/MockExcelAntWorkbookHandler.java
src/excelant/testcases/org/apache/poi/ss/excelant/util/TestExcelAntEvaluationResult.java
src/integrationtest/org/apache/poi/stress/HPSFFileHandler.java
src/java/org/apache/poi/POITextExtractor.java
src/java/org/apache/poi/ddf/EscherClientAnchorRecord.java
src/java/org/apache/poi/ddf/EscherColorRef.java
src/java/org/apache/poi/hpsf/ClipboardData.java
src/java/org/apache/poi/hpsf/Thumbnail.java
src/java/org/apache/poi/hssf/dev/FormulaViewer.java
src/java/org/apache/poi/hssf/eventusermodel/EventWorkbookBuilder.java
src/java/org/apache/poi/hssf/extractor/EventBasedExcelExtractor.java
src/java/org/apache/poi/hssf/extractor/ExcelExtractor.java
src/java/org/apache/poi/hssf/model/InternalSheet.java
src/java/org/apache/poi/hssf/model/WorkbookRecordList.java
src/java/org/apache/poi/hssf/record/FontRecord.java
src/java/org/apache/poi/hssf/record/FtCfSubRecord.java
src/java/org/apache/poi/hssf/record/FtPioGrbitSubRecord.java
src/java/org/apache/poi/hssf/record/RecordFactoryInputStream.java
src/java/org/apache/poi/hssf/record/aggregates/RowRecordsAggregate.java
src/java/org/apache/poi/hssf/record/aggregates/ValueRecordsAggregate.java
src/java/org/apache/poi/hssf/record/cf/ColorGradientFormatting.java
src/java/org/apache/poi/hssf/record/cf/DataBarFormatting.java
src/java/org/apache/poi/hssf/record/crypto/Biff8DecryptingStream.java
src/java/org/apache/poi/hssf/usermodel/HSSFAnchor.java
src/java/org/apache/poi/hssf/usermodel/HSSFDataFormat.java
src/java/org/apache/poi/hssf/usermodel/HSSFDataValidation.java
src/java/org/apache/poi/hssf/usermodel/HSSFWorkbook.java
src/java/org/apache/poi/poifs/crypt/ChunkedCipherInputStream.java
src/java/org/apache/poi/poifs/crypt/ChunkedCipherOutputStream.java
src/java/org/apache/poi/poifs/crypt/DataSpaceMapUtils.java
src/java/org/apache/poi/poifs/crypt/xor/XORDecryptor.java
src/java/org/apache/poi/poifs/crypt/xor/XOREncryptor.java
src/java/org/apache/poi/poifs/eventfilesystem/POIFSReader.java
src/java/org/apache/poi/poifs/filesystem/DocumentDescriptor.java
src/java/org/apache/poi/poifs/filesystem/Ole10Native.java
src/java/org/apache/poi/poifs/filesystem/POIFSDocumentPath.java
src/java/org/apache/poi/ss/format/CellDateFormatter.java
src/java/org/apache/poi/ss/util/SheetBuilder.java
src/java/org/apache/poi/ss/util/cellwalk/CellWalk.java
src/java/org/apache/poi/util/BoundedInputStream.java
src/java/org/apache/poi/util/CommonsLogger.java
src/java/org/apache/poi/util/IntList.java
src/java/org/apache/poi/util/LittleEndianCP950Reader.java
src/java/org/apache/poi/util/POILogFactory.java
src/java/org/apache/poi/util/ReplacingInputStream.java
src/java/org/apache/poi/util/StringUtil.java
src/ooxml/java/org/apache/poi/POIXMLDocumentPart.java
src/ooxml/java/org/apache/poi/openxml4j/opc/OPCPackage.java
src/ooxml/java/org/apache/poi/openxml4j/opc/internal/marshallers/PackagePropertiesMarshaller.java
src/ooxml/java/org/apache/poi/openxml4j/util/ZipSecureFile.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureConfig.java
src/ooxml/java/org/apache/poi/poifs/crypt/dsig/SignatureInfo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFDocument.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFMaster.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFPage.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFShape.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/XDGFSheet.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CharacterSection.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/CombinedIterable.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/GeometrySection.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/ArcTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/Ellipse.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/EllipticalArcTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/InfiniteLine.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/LineTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/MoveTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/NURBSTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/PolyLineTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelCubBezTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelEllipticalArcTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelLineTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelMoveTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/RelQuadBezTo.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineKnot.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/section/geometry/SplineStart.java
src/ooxml/java/org/apache/poi/xdgf/usermodel/shape/ShapeDebuggerRenderer.java
src/ooxml/java/org/apache/poi/xslf/extractor/XSLFPowerPointExtractor.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFPictureData.java
src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFTableCell.java
src/ooxml/java/org/apache/poi/xssf/binary/XSSFBCommentsTable.java
src/ooxml/java/org/apache/poi/xssf/binary/XSSFBSheetHandler.java
src/ooxml/java/org/apache/poi/xssf/binary/XSSFBStylesTable.java
src/ooxml/java/org/apache/poi/xssf/eventusermodel/XSSFBReader.java
src/ooxml/java/org/apache/poi/xssf/extractor/XSSFBEventBasedExcelExtractor.java
src/ooxml/java/org/apache/poi/xssf/extractor/XSSFEventBasedExcelExtractor.java
src/ooxml/java/org/apache/poi/xssf/streaming/AutoSizeColumnTracker.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFRow.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
src/ooxml/java/org/apache/poi/xssf/usermodel/BaseXSSFEvaluationWorkbook.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFConnector.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFDrawing.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFGraphicFrame.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFObjectData.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFPicture.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFShapeGroup.java
src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFSimpleShape.java
src/ooxml/java/org/apache/poi/xssf/usermodel/extensions/XSSFHeaderFooter.java
src/ooxml/java/org/apache/poi/xwpf/extractor/XWPFWordExtractor.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/PositionInParagraph.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFTableCell.java
src/ooxml/testcases/org/apache/poi/poifs/crypt/TestSignatureInfo.java
src/ooxml/testcases/org/apache/poi/sl/draw/TestDrawPictureShape.java
src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestPPTX2PNG.java
src/ooxml/testcases/org/apache/poi/xslf/usermodel/TestXSLFTextShape.java
src/scratchpad/src/org/apache/poi/hdgf/HDGFLZWCompressor.java
src/scratchpad/src/org/apache/poi/hdgf/streams/CompressedStreamStore.java
src/scratchpad/src/org/apache/poi/hemf/extractor/HemfExtractor.java
src/scratchpad/src/org/apache/poi/hpbf/extractor/PublisherTextExtractor.java
src/scratchpad/src/org/apache/poi/hslf/blip/Metafile.java
src/scratchpad/src/org/apache/poi/hslf/extractor/PowerPointExtractor.java
src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPropCollection.java
src/scratchpad/src/org/apache/poi/hslf/record/EscherPlaceholder.java
src/scratchpad/src/org/apache/poi/hslf/record/OEPlaceholderAtom.java
src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java
src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
src/scratchpad/src/org/apache/poi/hslf/record/TextSpecInfoRun.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFFontInfo.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowEncrypted.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFSlideShowImpl.java
src/scratchpad/src/org/apache/poi/hslf/usermodel/HSLFTextParagraph.java
src/scratchpad/src/org/apache/poi/hsmf/MAPIMessage.java
src/scratchpad/src/org/apache/poi/hssf/converter/AbstractExcelConverter.java
src/scratchpad/src/org/apache/poi/hssf/converter/ExcelToHtmlConverter.java
src/scratchpad/src/org/apache/poi/hwmf/draw/HwmfDrawProperties.java
src/scratchpad/src/org/apache/poi/hwmf/draw/HwmfSLImageRenderer.java
src/scratchpad/src/org/apache/poi/hwmf/record/HwmfBitmapDib.java
src/scratchpad/src/org/apache/poi/hwpf/converter/WordToFoConverter.java
src/scratchpad/src/org/apache/poi/hwpf/converter/WordToTextConverter.java
src/scratchpad/src/org/apache/poi/hwpf/model/FontTable.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/BookmarksImpl.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/HWPFList.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/HeaderStories.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/NotesImpl.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/ParagraphProperties.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/PictureRunMapper.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/Table.java
src/scratchpad/src/org/apache/poi/hwpf/usermodel/TableRow.java
src/scratchpad/testcases/org/apache/poi/hdgf/streams/StreamTest.java
src/scratchpad/testcases/org/apache/poi/hwmf/TestHwmfParsing.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestCHPBinTable.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestDocumentProperties.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFileInformationBlock.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestFontTable.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestPlexOfCps.java
src/scratchpad/testcases/org/apache/poi/hwpf/model/TestStyleSheet.java
src/scratchpad/testcases/org/apache/poi/hwpf/usermodel/TestBorderCode.java
src/testcases/org/apache/poi/hssf/usermodel/TestCellStyle.java
src/testcases/org/apache/poi/hssf/usermodel/TestFormulaEvaluatorBugs.java
src/testcases/org/apache/poi/poifs/storage/TestRawDataBlock.java
src/testcases/org/apache/poi/ss/util/cellwalk/TestCellWalk.java
src/testcases/org/apache/poi/util/TestIOUtils.java
src/testcases/org/apache/poi/util/TestPOILogger.java

index d9896a712c4623b5f306abf47fd39bc03f4fee94..84898383bec892a24d685f185b6cdd22fef2d765 100644 (file)
@@ -794,9 +794,9 @@ public class AddDimensionedImage {
      */
     public class ClientAnchorDetail {
 
-        public int fromIndex = 0;
-        public int toIndex = 0;
-        public int inset = 0;
+        public int fromIndex;
+        public int toIndex;
+        public int inset;
 
         /**
          * Create a new instance of the ClientAnchorDetail class using the
index b250441110e88fabde7c5309b6fd930bf047c970..c568a6ed29fbbb8f35050c386f41815c8bea7ed7 100644 (file)
@@ -512,8 +512,8 @@ public class InCellLists {
      */
     public final class MultiLevelListItem {
 
-        private String itemText = null;
-        private ArrayList<String> lowerLevelItems = null;
+        private String itemText;
+        private ArrayList<String> lowerLevelItems;
 
         /**
          * Create a new instance of the MultiLevelListItem class using the
index 273ed07fdbe54e559ac3ee0f61d54ea9e824c00c..bb19bff82ef8fcc51cfa0cafaf59ce62d559bdbe 100644 (file)
@@ -33,19 +33,19 @@ import org.apache.poi.ss.usermodel.BorderStyle;
  * @author Jason Height
  */
 public class SVBorder extends AbstractBorder {
-  private Color northColor = null;
-  private Color eastColor = null;
-  private Color southColor = null;
-  private Color westColor = null;
+  private Color northColor;
+  private Color eastColor;
+  private Color southColor;
+  private Color westColor;
   private BorderStyle northBorderType = BorderStyle.NONE;
   private BorderStyle eastBorderType = BorderStyle.NONE;
   private BorderStyle southBorderType = BorderStyle.NONE;
   private BorderStyle westBorderType = BorderStyle.NONE;
-  private boolean northBorder=false;
-  private boolean eastBorder=false;
-  private boolean southBorder=false;
-  private boolean westBorder=false;
-  private boolean selected = false;
+  private boolean northBorder;
+  private boolean eastBorder;
+  private boolean southBorder;
+  private boolean westBorder;
+  private boolean selected;
 
    public void setBorder(Color northColor, Color eastColor,
                          Color southColor, Color westColor,
index 1448c5363ced08be0d57046b3f5ed7679b510d5b..fe7163c8c3e78e358c74a6c9802c2fc439067f46 100644 (file)
@@ -56,7 +56,7 @@ public class SVTableCellRenderer extends JLabel
     protected SVBorder cellBorder = new SVBorder();
 
 
-    private HSSFWorkbook wb = null;
+    private HSSFWorkbook wb;
 
     /** This class holds the references to the predefined cell formats.
      */
index 25ac83fc50cad1e2dbcaa3bd908b8547636390ea..7c741aac79a4771e94ac1b37d81e57e1bb7592f5 100644 (file)
@@ -34,8 +34,8 @@ import org.apache.poi.hssf.usermodel.HSSFCell;
  */
 
 public class SVTableModel extends AbstractTableModel {
-  private HSSFSheet st = null;
-  int maxcol = 0;
+  private HSSFSheet st;
+  int maxcol;
 
   public SVTableModel(HSSFSheet st, int maxcol) {
     this.st = st;
index a323992756dc0fad40c791583fa86dd66c835eae..1d3fefdff37b699103211e1244dfc4cf0e63fe65 100644 (file)
@@ -40,8 +40,8 @@ import org.apache.poi.hssf.usermodel.HSSFWorkbook;
  */
 public class SViewer extends JApplet {
   private SViewerPanel panel;
-  boolean isStandalone = false;
-  String filename = null;
+  boolean isStandalone;
+  String filename;
 
   /**Get a parameter value*/
   public String getParameter(String key, String def) {
index 4e644cda8bc16e5c66d687cedc0d7ca5a512ee0d..d4f8e0105d1a9c412790f2b7e5e19721f9d78b34 100644 (file)
@@ -864,9 +864,9 @@ public class AddDimensionedImage {
      */
     public class ClientAnchorDetail {
 
-        public int fromIndex = 0;
-        public int toIndex = 0;
-        public int inset = 0;
+        public int fromIndex;
+        public int toIndex;
+        public int inset;
 
         /**
          * Create a new instance of the ClientAnchorDetail class using the
index b6c5ea97298359e2baa53a2e6dc24ddf631c7d0f..1a9879f205cf5858721e13dce7620ee78957681c 100644 (file)
@@ -132,13 +132,13 @@ import org.apache.poi.ss.usermodel.WorkbookFactory;
  */
 public class ToCSV {
 
-    private Workbook workbook = null;
-    private ArrayList<ArrayList<String>> csvData = null;
-    private int maxRowWidth = 0;
-    private int formattingConvention = 0;
-    private DataFormatter formatter = null;
-    private FormulaEvaluator evaluator = null;
-    private String separator = null;
+    private Workbook workbook;
+    private ArrayList<ArrayList<String>> csvData;
+    private int maxRowWidth;
+    private int formattingConvention;
+    private DataFormatter formatter;
+    private FormulaEvaluator evaluator;
+    private String separator;
 
     private static final String CSV_FILE_EXTENSION = ".csv";
     private static final String DEFAULT_SEPARATOR = ",";
index 09ac0ed2c8a14b8487ae2db46e4f9b2778469002..22ee013ccc9a875f351ce715970e3d26bbda53b1 100644 (file)
@@ -70,7 +70,7 @@ public class XLSX2CSV {
      *  as a (basic) CSV.
      */
     private class SheetToCSV implements SheetContentsHandler {
-        private boolean firstCellOfRow = false;
+        private boolean firstCellOfRow;
         private int currentRow = -1;
         private int currentCol = -1;
         
index 4b1641b97f9243aec83475c59bca2d0e9700c69b..ad14d72710b49d82773f47b36681b9d77cbbd6d7 100644 (file)
@@ -49,8 +49,8 @@ import org.apache.poi.xwpf.usermodel.XWPFDocument;
  */
 public class UpdateEmbeddedDoc {
 
-    private XWPFDocument doc = null;
-    private File docFile = null;
+    private XWPFDocument doc;
+    private File docFile;
 
     private static final int SHEET_NUM = 0;
     private static final int ROW_NUM = 0;
index bf1334848562f3b0972e1eb98c5841522e8c2061..a624b98b571490430b0177261b36803726d1929d 100644 (file)
@@ -42,14 +42,14 @@ public class ExcelAntEvaluateCell extends Task {
        private double precision ;
        private double precisionToUse ;
        private double globalPrecision ;
-       private boolean requiredToPass = false ;
+       private boolean requiredToPass;
        
        
        private ExcelAntEvaluationResult result  ;
        
        private ExcelAntWorkbookUtil wbUtil ;
        
-       private boolean showDelta = false ;
+       private boolean showDelta;
        
        
        public ExcelAntEvaluateCell() {}
index e9bb072e58005cf922cd854ad5a02a8094a3d4f8..625d1a402444bfa36e7be75447c848bc121f301a 100644 (file)
@@ -37,7 +37,7 @@ public class ExcelAntTask extends Task {
        
        private String excelFileName ;
        
-       private boolean failOnError = false  ;
+       private boolean failOnError;
        
        private ExcelAntWorkbookUtil workbookUtil ;
        
index fd8f930919cbed4fc253c65a461ca8b6a72e7af0..fc35eba08a28e836866d5afd04488a3d864a24d4 100644 (file)
@@ -44,9 +44,9 @@ public class ExcelAntTest extends Task{
        
        private double globalPrecision;
        
-       private boolean showSuccessDetails = false;
+       private boolean showSuccessDetails;
        
-       private boolean showFailureDetail = false;
+       private boolean showFailureDetail;
        LinkedList<String> failureMessages;
        
 
index 6e52e1d4bf30d6c651207e6078894e96fcd9b83b..cf4d8d7c0c17a442335e182ca1fd554bbcbfd11a 100644 (file)
@@ -22,8 +22,8 @@ import static org.junit.Assert.assertNotNull;
 import org.apache.poi.ss.usermodel.Workbook;
 
 public class MockExcelAntWorkbookHandler implements IExcelAntWorkbookHandler {
-    public static boolean executed = false;
-    public static Workbook workbook = null;
+    public static boolean executed;
+    public static Workbook workbook;
     
     
     @Override
index 9c9213e520e97926ebb38aa7519f71a128a87a7e..7112f6acadd7a2eb9acd4a2959ed73f61f49aeb9 100644 (file)
@@ -26,8 +26,8 @@ import org.junit.Test;
 public class TestExcelAntEvaluationResult {
        private ExcelAntEvaluationResult fixture;
        
-       private boolean completedWithError = false;
-    private boolean passed = false;
+       private boolean completedWithError;
+    private boolean passed;
     private double retValue  = 1.1; 
     private String errMessage = "error message";  
     private double delta = 2.2; 
index 5fe154c1d9ebcdc69890ecd401b128fd079f34c3..d726e2647f9aa45761bfcb7cecf855f71c6785e4 100644 (file)
@@ -46,7 +46,7 @@ import org.junit.Test;
 public class HPSFFileHandler extends POIFSFileHandler {
     private static final String NL = System.getProperty("line.separator");
     
-    private static File copyOutput = null;
+    private static File copyOutput;
     
     static final Set<String> EXCLUDES_HANDLE_ADD = unmodifiableHashSet(
         "spreadsheet/45290.xls",
@@ -92,8 +92,8 @@ public class HPSFFileHandler extends POIFSFileHandler {
            try {
                return PropertySet.isPropertySetStream(dis);
            } finally {
-               dis.close();;
-           }
+               dis.close();
+        }
        }
        
     @Override
index 83e26be942b2bf69ab44d2302d23a0d50300d394..58cf5e6ddbcbe54232627a4a9d487e1394f8e85b 100644 (file)
@@ -32,7 +32,7 @@ import java.io.IOException;
  * @see org.apache.poi.hwpf.extractor.WordExtractor
  */
 public abstract class POITextExtractor implements Closeable {
-    private Closeable fsToClose = null;
+    private Closeable fsToClose;
     
        /**
         * Retrieves all the text from the document.
index deb11d6983e9fe43ad5a06800492223a0df6af9e..b038c12d305eb28d45c9bcae1e99e8c1ff6718ed 100644 (file)
@@ -51,7 +51,7 @@ public class EscherClientAnchorRecord
     private short field_8_row2;
     private short field_9_dy2;
     private byte[] remainingData = new byte[0];
-    private boolean shortRecord = false;
+    private boolean shortRecord;
 
     @Override
     public int fillFields(byte[] data, int offset, EscherRecordFactory recordFactory) {
index ceaf94cbaa0068cd8b1f90ecfa06fdbbdceb7c75..949a905c9834a8d184e23e6592862489b5e56265 100644 (file)
@@ -26,7 +26,7 @@ import org.apache.poi.util.LittleEndian;
 public class EscherColorRef {
     @SuppressWarnings("unused")
     private int opid = -1;
-    private int colorRef = 0;
+    private int colorRef;
 
     public enum SysIndexSource {
         /** Use the fill color of the shape. */
index 396a58277278a09d1218e5e7b0a76fa06e0cb74b..3617c4ac6c67c3d5087a7a475cf0d278262232e4 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.poi.util.POILogger;
 class ClipboardData {
     private static final POILogger LOG = POILogFactory.getLogger( ClipboardData.class );
 
-    private int _format = 0;
+    private int _format;
     private byte[] _value;
     
     ClipboardData() {}
index a1faf3d0802f35a3832b5c47b35e6ad1d645b054..87bd68228f34580bb2f0b8d5d3103ff8a2b8b9e7 100644 (file)
@@ -123,7 +123,7 @@ public final class Thumbnail {
      * <p>A <code>byte[]</code> to hold a thumbnail image in ({@link
      * Variant#VT_CF VT_CF}) format.</p>
      */
-    private byte[] _thumbnailData = null;
+    private byte[] _thumbnailData;
 
 
 
index 4ef3ede77a836f7be652feade6c354137ecb8fc7..c506ad47be9251176b9f50f13b81bda9eda0342b 100644 (file)
@@ -42,7 +42,7 @@ import org.apache.poi.ss.formula.ptg.Ptg;
 public class FormulaViewer
 {
     private String file;
-    private boolean list=false;
+    private boolean list;
 
     /** Creates new FormulaViewer */
 
index eb65517ceaf9c0a4f588e580a1626149e98ea6d6..ed0f8f2469cd07c4bcf09c8431cb00dbc4aea6c5 100644 (file)
@@ -116,7 +116,7 @@ public class EventWorkbookBuilder {
                private final HSSFListener childListener;
                private final List<BoundSheetRecord> boundSheetRecords = new ArrayList<BoundSheetRecord>();
                private final List<ExternSheetRecord> externSheetRecords = new ArrayList<ExternSheetRecord>();
-               private SSTRecord sstRecord = null;
+               private SSTRecord sstRecord;
 
                public SheetRecordCollectingListener(HSSFListener childListener) {
                        this.childListener = childListener;
index f5475507a5b7fbbb80437fb218bc61924483075b..1b6b93434b75f2317cae67f75e2e4e4a8e136b1e 100644 (file)
@@ -63,7 +63,7 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
 public class EventBasedExcelExtractor extends POIOLE2TextExtractor implements org.apache.poi.ss.extractor.ExcelExtractor {
     private DirectoryNode _dir;
     boolean _includeSheetNames = true;
-    boolean _formulasNotResults = false;
+    boolean _formulasNotResults;
 
     public EventBasedExcelExtractor( DirectoryNode dir )
     {
@@ -167,7 +167,7 @@ public class EventBasedExcelExtractor extends POIOLE2TextExtractor implements or
        private int sheetNum = -1;
        private int rowNum;
 
-       private boolean outputNextStringValue = false;
+       private boolean outputNextStringValue;
        private int nextRow = -1;
 
        public TextListener() {
index 0e7e31ac47163d41f7b1dbc3bbdad96e652bb744..f313b96e3a88fdb21d23f60316c390eed58989b0 100644 (file)
@@ -58,8 +58,8 @@ public class ExcelExtractor extends POIOLE2TextExtractor implements org.apache.p
        private final HSSFDataFormatter _formatter;
        private boolean _includeSheetNames = true;
        private boolean _shouldEvaluateFormulas = true;
-       private boolean _includeCellComments = false;
-       private boolean _includeBlankCells = false;
+       private boolean _includeCellComments;
+       private boolean _includeBlankCells;
        private boolean _includeHeadersFooters = true;
 
        public ExcelExtractor(HSSFWorkbook wb) {
index 397c1f6e31b74e9fe5bc33e657b5eb35d91ec611..be21dff69512cf33a30d36681b61711e58adc0c8 100644 (file)
@@ -66,9 +66,9 @@ public final class InternalSheet {
     private static POILogger            log              = POILogFactory.getLogger(InternalSheet.class);
 
     private List<RecordBase>             _records;
-    protected PrintGridlinesRecord       printGridlines    =     null;
-    protected PrintHeadersRecord         printHeaders      =     null;
-    protected GridsetRecord              gridset           =     null;
+    protected PrintGridlinesRecord       printGridlines;
+    protected PrintHeadersRecord         printHeaders;
+    protected GridsetRecord              gridset;
     private   GutsRecord                 _gutsRecord;
     protected DefaultColWidthRecord      defaultcolwidth   =     new DefaultColWidthRecord();
     protected DefaultRowHeightRecord     defaultrowheight  =     new DefaultRowHeightRecord();
@@ -80,8 +80,8 @@ public final class InternalSheet {
      */
     private final WorksheetProtectionBlock _protectionBlock = new WorksheetProtectionBlock();
 
-    protected WindowTwoRecord            windowTwo         =     null;
-    protected SelectionRecord            _selection         =     null;
+    protected WindowTwoRecord            windowTwo;
+    protected SelectionRecord            _selection;
     /** java object always present, but if empty no BIFF records are written */
     private final MergedCellsTable       _mergedCellsTable;
     /** always present in this POI object, not always written to Excel file */
@@ -90,13 +90,13 @@ public final class InternalSheet {
     private DimensionsRecord             _dimensions;
     /** always present */
     protected final RowRecordsAggregate  _rowsAggregate;
-    private   DataValidityTable          _dataValidityTable=     null;
+    private   DataValidityTable          _dataValidityTable;
     private   ConditionalFormattingTable condFormatting;
 
-    private   Iterator<RowRecord>        rowRecIterator    =     null;
+    private   Iterator<RowRecord>        rowRecIterator;
 
     /** Add an UncalcedRecord if not true indicating formulas have not been calculated */
-    protected boolean _isUncalced = false;
+    protected boolean _isUncalced;
 
     public static final byte PANE_LOWER_RIGHT = (byte)0;
     public static final byte PANE_UPPER_RIGHT = (byte)1;
index b29d7268e9f1589a61bed42a0e1addcd2c721c9b..28c1e519b5a603ab37fddad1e4c707bd6028db72 100644 (file)
@@ -26,23 +26,23 @@ public final class WorkbookRecordList {
     private List<Record> records = new ArrayList<Record>();
 
     /** holds the position of the protect record */
-       private int protpos            = 0;
+       private int protpos;
     /** holds the position of the last bound sheet */
-       private int bspos              = 0;
+       private int bspos;
     /** holds the position of the tabid record */
-       private int tabpos             = 0;
+       private int tabpos;
     /** hold the position of the last font record */
-       private int fontpos            = 0;
+       private int fontpos;
     /** hold the position of the last extended font record */
-       private int xfpos              = 0;
+       private int xfpos;
     /** holds the position of the backup record */
-       private int backuppos      = 0;
+       private int backuppos;
     /** holds the position of last name record */
-       private int namepos            = 0;
+       private int namepos;
        /** holds the position of sup book */
-       private int supbookpos     = 0;
+       private int supbookpos;
        /** holds the position of the extern sheet */
-       private int externsheetPos = 0;
+       private int externsheetPos;
        /** hold the position of the palette, if applicable */
        private int palettepos     = -1;
 
index 03efd8403504c6fd61bceb05880f177b4bd07a2c..1af6142eda6e3f05bbe0f1e01b4a100e119ca46f 100644 (file)
@@ -58,7 +58,7 @@ public final class FontRecord extends StandardRecord {
        private byte                  field_6_underline;          // 00none/01single/02double/21singleaccounting/22doubleaccounting
        private byte                  field_7_family;             // ?? defined by windows api logfont structure?
        private byte                  field_8_charset;            // ?? defined by windows api logfont structure?
-       private byte                  field_9_zero = 0;           // must be 0
+       private byte                  field_9_zero;           // must be 0
        /** possibly empty string never <code>null</code> */
        private String                field_11_font_name;
 
index 87075c91c7a16f6abdc57341a0d0f591bf691e73..7e202c0831771321e9ef5063e1993ae40172bf6c 100644 (file)
@@ -46,7 +46,7 @@ public final class FtCfSubRecord extends SubRecord implements Cloneable {
      */
     public static final short UNSPECIFIED_BIT = (short)0xFFFF;
     
-    private short flags = 0;
+    private short flags;
 
     /**
      * Construct a new <code>FtPioGrbitSubRecord</code> and
index c15a6cbdd3277d22f1eb3bf03d42a18c4e16dd71..eaf8a5af293ef0f9f51f578213d8ea66ed2790bd 100644 (file)
@@ -83,7 +83,7 @@ public final class FtPioGrbitSubRecord extends SubRecord implements Cloneable {
     public static final int AUTO_LOAD_BIT    = 1 << 9;
 
     
-    private short flags = 0;
+    private short flags;
 
     /**
      * Construct a new <code>FtPioGrbitSubRecord</code> and
index 0a9616d71172226b7042661694b04248996d4c51..7ec0c83dc19929f427de2d53a5f928707ecd2cfc 100644 (file)
@@ -163,7 +163,7 @@ public final class RecordFactoryInputStream {
        /**
         * The most recent record that we gave to the user
         */
-       private Record _lastRecord = null;
+       private Record _lastRecord;
        /**
         * The most recent DrawingRecord seen
         */
index 8a97827687c2b9e0dc2546563c4f28a991ece03f..d1c12e0fceca60e7170cd36e8c68cabcc8c998ed 100644 (file)
@@ -43,7 +43,7 @@ public final class RowRecordsAggregate extends RecordAggregate {
 
     // Cache values to speed up performance of
     // getStartRowNumberForBlock / getEndRowNumberForBlock, see Bugzilla 47405
-    private RowRecord[] _rowRecordValues = null;
+    private RowRecord[] _rowRecordValues;
 
     /** Creates a new instance of ValueRecordsAggregate */
     public RowRecordsAggregate() {
index ac72b997cea911ce2afcaf0a390991422d8151d5..95040905ed238eadc1a21e62e0794ccde20c4588 100644 (file)
@@ -307,8 +307,8 @@ public final class ValueRecordsAggregate implements Iterable<CellValueRecordInte
         */
        class ValueIterator implements Iterator<CellValueRecordInterface> {
 
-               int curRowIndex = 0, curColIndex = -1;
-               int nextRowIndex = 0, nextColIndex = -1;
+               int curRowIndex, curColIndex = -1;
+               int nextRowIndex, nextColIndex = -1;
 
                public ValueIterator() {
                        getNextPos();
index 5197d814f9fd2b9481574e259b8020d8d8b0c7bf..02bfa33676bd104042d6dc278af29e32ac8db2ee 100644 (file)
@@ -33,7 +33,7 @@ import org.apache.poi.util.POILogger;
 public final class ColorGradientFormatting implements Cloneable {
     private static POILogger log = POILogFactory.getLogger(ColorGradientFormatting.class);
 
-    private byte options = 0;
+    private byte options;
     private ColorGradientThreshold[] thresholds;
     private ExtendedColor[] colors;
     
index 8810ef59c54697c8f0b5322694f3f5f25e55417e..60c1a521fc232b9ba0b3b8dfc59f2d245936104d 100644 (file)
@@ -31,9 +31,9 @@ import org.apache.poi.util.POILogger;
 public final class DataBarFormatting implements Cloneable {
     private static POILogger log = POILogFactory.getLogger(DataBarFormatting.class);
 
-    private byte options = 0;
-    private byte percentMin = 0;
-    private byte percentMax = 0;
+    private byte options;
+    private byte percentMin;
+    private byte percentMax;
     private ExtendedColor color;
     private DataBarThreshold thresholdMin;
     private DataBarThreshold thresholdMax;
index b8d8e393dd038645a1c1c122d187f3540f0321ee..1b5ea03cc586fecbad0deeecfbbe6b7e4602ad96 100644 (file)
@@ -39,7 +39,7 @@ public final class Biff8DecryptingStream implements BiffHeaderInput, LittleEndia
     private final EncryptionInfo info;
     private ChunkedCipherInputStream ccis;
     private final byte buffer[] = new byte[LittleEndianConsts.LONG_SIZE];
-    private boolean shouldSkipEncryptionOnCurrentRecord = false;
+    private boolean shouldSkipEncryptionOnCurrentRecord;
 
        public Biff8DecryptingStream(InputStream in, int initialOffset, EncryptionInfo info) throws RecordFormatException {
         try {
index a9e09bbe4e3ab4c9006b1301bd32c441bde4b8a9..56c918af47f99d2c9f9ac48f6f974d58ef5791c6 100644 (file)
@@ -30,8 +30,8 @@ import org.apache.poi.ss.usermodel.ChildAnchor;
  */
 public abstract class HSSFAnchor implements ChildAnchor {
 
-    protected boolean _isHorizontallyFlipped = false;
-    protected boolean _isVerticallyFlipped = false;
+    protected boolean _isHorizontallyFlipped;
+    protected boolean _isVerticallyFlipped;
 
     public HSSFAnchor() {
         createEscherAnchor();
@@ -47,10 +47,10 @@ public abstract class HSSFAnchor implements ChildAnchor {
 
     public static HSSFAnchor createAnchorFromEscher(EscherContainerRecord container){
         if (null != container.getChildById(EscherChildAnchorRecord.RECORD_ID)){
-            return new HSSFChildAnchor((EscherChildAnchorRecord) container.getChildById(EscherChildAnchorRecord.RECORD_ID));
+            return new HSSFChildAnchor(container.getChildById(EscherChildAnchorRecord.RECORD_ID));
         } else {
             if (null != container.getChildById(EscherClientAnchorRecord.RECORD_ID)){
-                return new HSSFClientAnchor((EscherClientAnchorRecord) container.getChildById(EscherClientAnchorRecord.RECORD_ID));
+                return new HSSFClientAnchor(container.getChildById(EscherClientAnchorRecord.RECORD_ID));
             }
             return null;
         }
index 7c3b636fdad1335a52581ed03c99ecf3ba6f9828..b6276f0ba0d85715db5eaa14f9d2e5911f2f00f7 100644 (file)
@@ -44,7 +44,7 @@ public final class HSSFDataFormat implements DataFormat {
 
        private final Vector<String> _formats = new Vector<String>();
        private final InternalWorkbook _workbook;
-       private boolean _movedBuiltins = false;  // Flag to see if need to
+       private boolean _movedBuiltins;  // Flag to see if need to
        // check the built in list
        // or if the regular list
        // has all entries.
index 206ee11b99bdfcc312a5c8ab8267d0b9badce384..40c0ada463974709076f90bf321469a3ec9f3521 100644 (file)
@@ -35,7 +35,7 @@ public final class HSSFDataValidation implements DataValidation {
 
        private int _errorStyle = ErrorStyle.STOP;
        private boolean _emptyCellAllowed = true;
-       private boolean _suppress_dropdown_arrow = false;
+       private boolean _suppress_dropdown_arrow;
        private boolean _showPromptBox = true;
        private boolean _showErrorBox = true;
        private CellRangeAddressList _regions;
index a705dc86a9f1c1bc65cf8acd65d8f052a995f3a0..69610c5a739b213ce1f8d88eda9e8b879e42ffa0 100644 (file)
@@ -960,7 +960,7 @@ public final class HSSFWorkbook extends POIDocument implements org.apache.poi.ss
     
     private final class SheetIterator<T extends Sheet> implements Iterator<T> {
         final private Iterator<T> it;
-        private T cursor = null;
+        private T cursor;
         @SuppressWarnings("unchecked")
         public SheetIterator() {
             it = (Iterator<T>) _sheets.iterator();
index ba60cb2fe4484ea1c18a015bd785186520ca1d5a..e71cbd412e3babaa5068f30b98779ef15b84fb3f 100644 (file)
@@ -41,7 +41,7 @@ public abstract class ChunkedCipherInputStream extends LittleEndianInputStream {
 
     private int lastIndex;
     private long pos;
-    private boolean chunkIsValid = false;
+    private boolean chunkIsValid;
 
     public ChunkedCipherInputStream(InputStream stream, long size, int chunkSize)
     throws GeneralSecurityException {
index 65579bebe7e1a03d4c5efeec4e113addcdb93d2a..a846cca34f95d052bb3fa80cdd1e017b5024255d 100644 (file)
@@ -64,7 +64,7 @@ public abstract class ChunkedCipherOutputStream extends FilterOutputStream {
     // the cipher can't be final, because for the last chunk we change the padding
     // and therefore need to change the cipher too
     private Cipher cipher;
-    private boolean isClosed = false;
+    private boolean isClosed;
 
     public ChunkedCipherOutputStream(DirectoryNode dir, int chunkSize) throws IOException, GeneralSecurityException {
         super(null);
index 9c377fa2d772b2dc61b477dbace9ccb5856462ee..2f5ccfd7a9af4edf6c576519760648c51641c688 100644 (file)
@@ -203,9 +203,9 @@ public class DataSpaceMapUtils {
         int transformType;
         String transformerId;
         String transformerName;
-        int readerVersionMajor = 1, readerVersionMinor = 0;
-        int updaterVersionMajor = 1, updaterVersionMinor = 0;
-        int writerVersionMajor = 1, writerVersionMinor = 0;
+        int readerVersionMajor = 1, readerVersionMinor;
+        int updaterVersionMajor = 1, updaterVersionMinor;
+        int writerVersionMajor = 1, writerVersionMinor;
 
         public TransformInfoHeader(
             int transformType,
@@ -257,9 +257,9 @@ public class DataSpaceMapUtils {
     
     public static class DataSpaceVersionInfo implements EncryptionRecord {
         String featureIdentifier;
-        int readerVersionMajor = 1, readerVersionMinor = 0;
-        int updaterVersionMajor = 1, updaterVersionMinor = 0;
-        int writerVersionMajor = 1, writerVersionMinor = 0;
+        int readerVersionMajor = 1, readerVersionMinor;
+        int updaterVersionMajor = 1, updaterVersionMinor;
+        int writerVersionMajor = 1, writerVersionMinor;
         
         public DataSpaceVersionInfo(LittleEndianInput is) {
             featureIdentifier = readUnicodeLPP4(is);
index 3eb66b549e4e5d0ce436ab682aa8ec2c6dc5e0f5..26fc78d8b7ba0ed2993edb9007f0745d15c0caa0 100644 (file)
@@ -101,8 +101,8 @@ public class XORDecryptor extends Decryptor implements Cloneable {
 
     private class XORCipherInputStream extends ChunkedCipherInputStream {
         private final int initialOffset;
-        private int recordStart = 0;
-        private int recordEnd = 0;
+        private int recordStart;
+        private int recordEnd;
         
         public XORCipherInputStream(InputStream stream, int initialPos)
                 throws GeneralSecurityException {
index 1c0834c8ca767866bd2776cd28566e8cb31965f6..c090fe3610e492701b2004e30f0c68218a8dd467 100644 (file)
@@ -88,8 +88,8 @@ public class XOREncryptor extends Encryptor implements Cloneable {
     }
 
     private class XORCipherOutputStream extends ChunkedCipherOutputStream {
-        private int recordStart = 0;
-        private int recordEnd = 0;
+        private int recordStart;
+        private int recordEnd;
 
         public XORCipherOutputStream(OutputStream stream, int initialPos) throws IOException, GeneralSecurityException {
             super(stream, -1);
index c236c4b83b85d1a97bb3a41e5419c2d73e449ce9..c4aaecfe0cbed6ef54d91976b9b2fd27a3453025 100644 (file)
@@ -51,7 +51,7 @@ public class POIFSReader
 {
     private final POIFSReaderRegistry registry;
     private boolean registryClosed;
-    private boolean notifyEmptyDirectories = false;
+    private boolean notifyEmptyDirectories;
 
     /**
      * Create a POIFSReader
index cc9d7eb5e613a288000ec5210b689e76bab03a66..30382242144dcf564d2ba130576071937548bb99 100644 (file)
@@ -30,7 +30,7 @@ public class DocumentDescriptor
 {
     private POIFSDocumentPath path;
     private String            name;
-    private int               hashcode = 0;
+    private int               hashcode;
 
     /**
      * Trivial constructor
index 7ccdf5ed2f48a73a27ac4c6a4782db5abca64210..5d197a8002b35ba18ade0dd045d1f9e75a14b264 100644 (file)
@@ -42,11 +42,11 @@ public class Ole10Native {
     private short flags1 = 2;          // 2 bytes, unknown, mostly [02 00]
     private String label;              // ASCIIZ, stored in this field without the terminating zero
     private String fileName;           // ASCIIZ, stored in this field without the terminating zero
-    private short flags2 = 0;          // 2 bytes, unknown, mostly [00 00]
+    private short flags2;          // 2 bytes, unknown, mostly [00 00]
     private short unknown1 = 3;        // see below
     private String command;            // ASCIIZ, stored in this field without the terminating zero
     private byte[] dataBuffer;         // varying size, the actual native data
-    private short flags3 = 0;          // some final flags? or zero terminators?, sometimes not there
+    private short flags3;          // some final flags? or zero terminators?, sometimes not there
   
     /**
      * the field encoding mode - merely a try-and-error guess ...
index 916267b654d58b8cd0649ea5a42c45b2ed622e18..2c35ac51eb6b6853a07458de03033bc1568f3217 100644 (file)
@@ -36,7 +36,7 @@ public class POIFSDocumentPath
     private static final POILogger log = POILogFactory.getLogger(POIFSDocumentPath.class);
           
     private final String[] components;
-    private int hashcode = 0; //lazy-compute hashCode
+    private int hashcode; //lazy-compute hashCode
 
     /**
      * constructor for the path of a document that is not in the root
index 4af6d6b4b46404a04c006ab81448b7f34294a87d..848a9e372c440e0654a7df1b7109a07470aad07d 100644 (file)
@@ -41,7 +41,7 @@ public class CellDateFormatter extends CellFormatter {
     private final Calendar EXCEL_EPOCH_CAL =
         LocaleUtil.getLocaleCalendar(1904, 0, 1);
 
-    private static /* final */ CellDateFormatter SIMPLE_DATE = null;
+    private static /* final */ CellDateFormatter SIMPLE_DATE;
 
     private class DatePartHandler implements CellFormatPart.PartHandler {
         private int mStart = -1;
index ba80711e780c0f6442b81cc94ea88d39a92f05ee..9dc0c6096f3e1158a4dd7063511709b23e1830e2 100644 (file)
@@ -35,8 +35,8 @@ public class SheetBuilder {
 
     private final Workbook workbook;
     private final Object[][] cells;
-    private boolean shouldCreateEmptyCells = false;
-    private String sheetName = null;
+    private boolean shouldCreateEmptyCells;
+    private String sheetName;
 
     public SheetBuilder(Workbook workbook, Object[][] cells) {
         this.workbook = workbook;
index b6fbbb3ffae5818f2597ae9cd821566bb9e587fb..c69294676e46253a1792c7366ba2c1734c86ccb9 100644 (file)
@@ -110,9 +110,9 @@ public class CellWalk {
      * @author Roman Kashitsyn
      */
     private static class SimpleCellWalkContext implements CellWalkContext {
-        public long ordinalNumber = 0;
-        public int rowNumber = 0;
-        public int colNumber = 0;
+        public long ordinalNumber;
+        public int rowNumber;
+        public int colNumber;
 
         public long getOrdinalNumber() {
             return ordinalNumber;
index 1ef84d9ff094d4d7504961fb10a08a38c34e208d..8b5a7a8dd5c1557c227251d225a9449db6e816ed 100644 (file)
@@ -42,7 +42,7 @@ public class BoundedInputStream extends InputStream {
     private final long max;
 
     /** the number of bytes already returned */
-    private long pos = 0;
+    private long pos;
 
     /** the marked position */
     private long mark = -1;
index a204fde17a71448b018424c5b9bdd6acb63c0a39..1825deaacd30923f645cef988623963ebd084b02 100644 (file)
@@ -31,7 +31,7 @@ import org.apache.commons.logging.LogFactory;
 public class CommonsLogger extends POILogger
 {
     private static final LogFactory   _creator = LogFactory.getFactory();
-    private Log             log   = null;
+    private Log             log;
 
     @Override
     public void initialize(final String cat)
index 08f024082e8b398979aa71b268d7a70b303ff47f..62276d920daa5c01e2b9484c1fe1a278d35bbb47 100644 (file)
@@ -47,7 +47,7 @@ public class IntList
 {
     private int[]            _array;
     private int              _limit;
-    private int              fillval = 0;
+    private int              fillval;
     private static final int _default_size = 128;
 
     /**
index d3d29307c4bf691f68513f60dd54f82f56524d50..61808afcaa4b5f86cd45de72234d243c856ebd0e 100644 (file)
@@ -54,7 +54,7 @@ public class LittleEndianCP950Reader extends Reader {
     private int offset;
     private int trailing;
     private int leading;
-    int cnt = 0;
+    int cnt;
     //the char that is logically trailing in Big5 encoding
     //however in LittleEndian order, this is the first encountered.
     public LittleEndianCP950Reader(byte[] data) {
index 1e34ccd29bacffd085792e7b355a1345cc4cf925..34460702fc44f3863e26f09810c46bd058401a37 100644 (file)
@@ -46,7 +46,7 @@ public final class POILogFactory {
      * The name of the class to use. Initialised the
      *  first time we need it
      */
-    static String _loggerClassName = null;
+    static String _loggerClassName;
 
     /**
      * Construct a POILogFactory.
index 47c153432cd6c4883b46b8439dea5472f95d30bf..884bd838f233618248c34a050f6e48c10257830d 100644 (file)
@@ -35,9 +35,9 @@ public class ReplacingInputStream extends FilterInputStream {
 
     // while matching, this is where the bytes go.
     final int[] buf;
-    private int matchedIndex=0;
-    private int unbufferIndex=0;
-    private int replacedIndex=0;
+    private int matchedIndex;
+    private int unbufferIndex;
+    private int replacedIndex;
 
     private final byte[] pattern;
     private final byte[] replacement;
index fa84f6ef5cb0d104dc031395bfd41c940d96f226..30aee7a066dd4465977e49f8e26ec7cc07547a3e 100644 (file)
@@ -315,7 +315,7 @@ public class StringUtil {
     */
    public static class StringsIterator implements Iterator<String> {
       private String[] strings = {};
-      private int position = 0;
+      private int position;
       public StringsIterator(String[] strings) {
           if (strings != null) {
               this.strings = strings.clone();
index 41435ec4a63b6ca3c36885ee60a3f49d3f1cbdf3..a777887e96030951520b11de5ccf23096e7f2955 100644 (file)
@@ -93,7 +93,7 @@ public class POIXMLDocumentPart {
      * Counter that provides the amount of incoming relations from other parts
      * to this part.
      */
-    private int relationCounter = 0;
+    private int relationCounter;
 
     int incrementRelationCounter() {
         relationCounter++;
index 1389fb7426f23cf8b06209803b9c5b1f197a9548..15031fbcf61d9ab02acdc95ffd23f71fc57a27ba 100644 (file)
@@ -116,7 +116,7 @@ public abstract class OPCPackage implements RelationshipSource, Closeable {
        /**
         * Flag if a modification is done to the document.
         */
-       protected boolean isDirty = false;
+       protected boolean isDirty;
 
        /**
         * File path of this package.
index 7a8f400723d80a865b279ff78f8a3ad5b7766250..613c6f0208711d876ce3cb3afcf456cc6d773172 100644 (file)
@@ -80,7 +80,7 @@ public class PackagePropertiesMarshaller implements PartMarshaller {
        PackagePropertiesPart propsPart;
 
        // The document
-       Document xmlDoc = null;
+       Document xmlDoc;
 
        /**
         * Marshall package core properties to an XML document. Always return
index f5d2737c865b443e12b7075a8b47e92428c173ff..971ba366908b9d01bf015feaf31c99c49f2ef8b6 100644 (file)
@@ -197,8 +197,8 @@ public class ZipSecureFile extends ZipFile {
     }
 
     public static class ThresholdInputStream extends PushbackInputStream {
-        long counter = 0;
-        long markPos = 0;
+        long counter;
+        long markPos;
         ThresholdInputStream cis;
 
         public ThresholdInputStream(InputStream is, ThresholdInputStream cis) {
index fa87be191a0943b4d95f8ece00c6361d2fcab7c9..187272a90e06946ad2564a0c913cf183deb002a1 100644 (file)
@@ -83,12 +83,12 @@ public class SignatureConfig {
      * the optional signature policy service used for XAdES-EPES.
      */
     private SignaturePolicyService signaturePolicyService;
-    private URIDereferencer uriDereferencer = null;
+    private URIDereferencer uriDereferencer;
     private String canonicalizationMethod = CanonicalizationMethod.INCLUSIVE;
     
     private boolean includeEntireCertificateChain = true;
-    private boolean includeIssuerSerial = false;
-    private boolean includeKeyValue = false;
+    private boolean includeIssuerSerial;
+    private boolean includeKeyValue;
     
     /**
      * the time-stamp service used for XAdES-T and XAdES-X.
@@ -98,11 +98,11 @@ public class SignatureConfig {
      * timestamp service provider URL
      */
     private String tspUrl;
-    private boolean tspOldProtocol = false;
+    private boolean tspOldProtocol;
     /**
      * if not defined, it's the same as the main digest
      */
-    private HashAlgorithm tspDigestAlgo = null;
+    private HashAlgorithm tspDigestAlgo;
     private String tspUser;
     private String tspPass;
     private TimeStampServiceValidator tspValidator;
@@ -121,8 +121,8 @@ public class SignatureConfig {
     /**
      * if not defined, it's the same as the main digest
      */
-    private HashAlgorithm xadesDigestAlgo = null;
-    private String xadesRole = null;
+    private HashAlgorithm xadesDigestAlgo;
+    private String xadesRole;
     private String xadesSignatureId = "idSignedProperties";
     private boolean xadesSignaturePolicyImplied = true;
     private String xadesCanonicalizationMethod = CanonicalizationMethod.EXCLUSIVE;
@@ -150,7 +150,7 @@ public class SignatureConfig {
      * with certain namespaces, so this EventListener is used to interfere
      * with the marshalling process.
      */
-    EventListener signatureMarshalListener = null;
+    EventListener signatureMarshalListener;
 
     /**
      * Map of namespace uris to prefix
index 9edb1c3bbf2528eea0b89595778f2a73936296a5..766f8e68634869571c7da036762c6252b197ef9e 100644 (file)
@@ -171,7 +171,7 @@ import org.xml.sax.SAXException;
 public class SignatureInfo implements SignatureConfigurable {
 
     private static final POILogger LOG = POILogFactory.getLogger(SignatureInfo.class);
-    private static boolean isInitialized = false;
+    private static boolean isInitialized;
     
     private SignatureConfig signatureConfig;
 
@@ -376,8 +376,8 @@ public class SignatureInfo implements SignatureConfigurable {
                     OPCPackage pkg = signatureConfig.getOpcPackage();
                     Iterator<PackageRelationship> sigOrigRels = 
                         pkg.getRelationshipsByType(PackageRelationshipTypes.DIGITAL_SIGNATURE_ORIGIN).iterator();
-                    Iterator<PackageRelationship> sigRels = null;
-                    PackagePart sigPart = null;
+                    Iterator<PackageRelationship> sigRels;
+                    PackagePart sigPart;
                     
                     public boolean hasNext() {
                         while (sigRels == null || !sigRels.hasNext()) {
index ba460cc13c285d51cf4b5fdaf7fa4ef29f85e54a..1fe9515e3dcc28ee7a58317a5a4073458529aab3 100644 (file)
@@ -40,10 +40,10 @@ public class XDGFDocument {
     Map<Long, XDGFStyleSheet> _styleSheets = new HashMap<Long, XDGFStyleSheet>();
 
     // defaults
-    long _defaultFillStyle = 0;
-    long _defaultGuideStyle = 0;
-    long _defaultLineStyle = 0;
-    long _defaultTextStyle = 0;
+    long _defaultFillStyle;
+    long _defaultGuideStyle;
+    long _defaultLineStyle;
+    long _defaultTextStyle;
 
 
     public XDGFDocument(VisioDocumentType document) {
index 68c2c8626767fdd68544bb9b1fc0d78888551918..b1edbcb277e9fea92c2c8e0ee40bf5fe2bbd583d 100644 (file)
@@ -29,7 +29,7 @@ public class XDGFMaster {
 
     private MasterType _master;
     protected XDGFMasterContents _content;
-    protected XDGFSheet _pageSheet = null;
+    protected XDGFSheet _pageSheet;
 
     public XDGFMaster(MasterType master, XDGFMasterContents content,
             XDGFDocument document) {
index 3bdbd2e1b5caed15f17dfbca1e15e1f9bbb979e8..388d50a25bf4a1261676f4c858b79967e60252e8 100644 (file)
@@ -34,7 +34,7 @@ public class XDGFPage {
     private PageType _page;
     protected XDGFPageContents _content;
     protected XDGFPages _pages;
-    protected XDGFSheet _pageSheet = null;
+    protected XDGFSheet _pageSheet;
 
     public XDGFPage(PageType page, XDGFPageContents content,
             XDGFDocument document, XDGFPages pages) {
index 42deac4c26332f23a7473ae07cde52ea4519b5cd..7cb2be62984b5d712aef611f40bd5198aed1d53f 100644 (file)
@@ -49,58 +49,58 @@ public class XDGFShape extends XDGFSheet {
     XDGFBaseContents _parentPage;
     XDGFShape _parent; // only non-null if a subshape
 
-    XDGFMaster _master = null;
-    XDGFShape _masterShape = null;
+    XDGFMaster _master;
+    XDGFShape _masterShape;
 
-    XDGFText _text = null;
+    XDGFText _text;
 
     // subshapes if they exist
-    List<XDGFShape> _shapes = null;
+    List<XDGFShape> _shapes;
 
     // properties specific to shapes
 
     // center of rotation relative to origin of parent
-    Double _pinX = null;
-    Double _pinY = null;
+    Double _pinX;
+    Double _pinY;
 
-    Double _width = null;
-    Double _height = null;
+    Double _width;
+    Double _height;
 
     // center of rotation relative to self
-    Double _locPinX = null;
-    Double _locPinY = null;
+    Double _locPinX;
+    Double _locPinY;
 
     // start x coordinate, relative to parent
     // -> one dimensional shapes only
-    Double _beginX = null;
-    Double _beginY = null;
+    Double _beginX;
+    Double _beginY;
 
     // end x coordinate, relative to parent
     // -> one dimensional shapes only
-    Double _endX = null;
-    Double _endY = null;
+    Double _endX;
+    Double _endY;
 
-    Double _angle = null;
-    Double _rotationXAngle = null;
-    Double _rotationYAngle = null;
-    Double _rotationZAngle = null;
+    Double _angle;
+    Double _rotationXAngle;
+    Double _rotationYAngle;
+    Double _rotationZAngle;
 
     // end x coordinate, relative to parent
-    Boolean _flipX = null;
-    Boolean _flipY = null;
+    Boolean _flipX;
+    Boolean _flipY;
 
     // center of text relative to this shape
-    Double _txtPinX = null;
-    Double _txtPinY = null;
+    Double _txtPinX;
+    Double _txtPinY;
 
     // center of text relative to text block
-    Double _txtLocPinX = null;
-    Double _txtLocPinY = null;
+    Double _txtLocPinX;
+    Double _txtLocPinY;
 
-    Double _txtAngle = null;
+    Double _txtAngle;
 
-    Double _txtWidth = null;
-    Double _txtHeight = null;
+    Double _txtWidth;
+    Double _txtHeight;
 
     public XDGFShape(ShapeSheetType shapeSheet, XDGFBaseContents parentPage,
             XDGFDocument document) {
index 1cc807fdfbe3ec19896f6e0d381c1cbcfeabdf43..ab2c1d5111a830ffaea38e01b578b4908f4659f3 100644 (file)
@@ -52,7 +52,7 @@ public abstract class XDGFSheet {
     protected SortedMap<Long, GeometrySection> _geometry = new TreeMap<Long, GeometrySection>();
 
     // special: character section
-    protected CharacterSection _character = null;
+    protected CharacterSection _character;
 
     public XDGFSheet(SheetType sheet, XDGFDocument document) {
         try {
index 7c1aa3f0c50cd4c59f4eb120704e99b5bb67fbce..97d62c5c2a68dd0a33af728338ec3a6199ef2c21 100644 (file)
@@ -30,8 +30,8 @@ import com.microsoft.schemas.office.visio.x2012.main.SectionType;
 
 public class CharacterSection extends XDGFSection {
 
-    Double _fontSize = null;
-    Color _fontColor = null;
+    Double _fontSize;
+    Color _fontColor;
 
     Map<String, XDGFCell> _characterCells = new HashMap<String, XDGFCell>();
 
index d51e9070df242a6bb0a6d5ea039fa60d33f4a27a..2d6f251bb4744b57b73f8536387d6a9cbfd660b9 100644 (file)
@@ -56,8 +56,8 @@ public class CombinedIterable<T> implements Iterable<T> {
 
             Long lastI = Long.MIN_VALUE;
 
-            Entry<Long, T> currentBase = null;
-            Entry<Long, T> currentMaster = null;
+            Entry<Long, T> currentBase;
+            Entry<Long, T> currentMaster;
 
             // grab the iterator for both
             Iterator<Entry<Long, T>> baseI = _baseItems.entrySet().iterator();
index bc7cdf60b4125fa88d0c225336453ba19ea4cdd9..6f47ad59334e73937163995ae559098d185caadb 100644 (file)
@@ -40,7 +40,7 @@ import com.microsoft.schemas.office.visio.x2012.main.SectionType;
 
 public class GeometrySection extends XDGFSection {
 
-    GeometrySection _master = null;
+    GeometrySection _master;
 
     // rows
     SortedMap<Long, GeometryRow> _rows = new TreeMap<Long, GeometryRow>();
index fdcce8056035d31c5f87ff15aee186c4632b6622..be2a291c14940e0257dc8cdcbeaa412de13d141c 100644 (file)
@@ -31,18 +31,18 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
 
 public class ArcTo implements GeometryRow {
 
-    ArcTo _master = null;
+    ArcTo _master;
 
     // The x-coordinate of the ending vertex of an arc.
-    Double x = null;
+    Double x;
 
     // The y-coordinate of the ending vertex of an arc.
-    Double y = null;
+    Double y;
 
     // The distance from the arc's midpoint to the midpoint of its chord.
-    Double a = null;
+    Double a;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 01eecdd00393afb8cc19c5cfb719be21132c5ff2..ba4d3ff67cc825f2513b1a868211276f0243cbeb 100644 (file)
@@ -30,24 +30,24 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
 
 public class Ellipse implements GeometryRow {
 
-    Ellipse _master = null;
+    Ellipse _master;
 
     // x coordinate of center point
-    Double x = null;
+    Double x;
     // y coordinate of center point
-    Double y = null;
+    Double y;
 
     // x coordinate of first point on ellipse
-    Double a = null;
+    Double a;
     // y coordinate of first point on ellipse
-    Double b = null;
+    Double b;
 
     // x coordinate of second point on ellipse
-    Double c = null;
+    Double c;
     // y coordinate of second point on ellipse
-    Double d = null;
+    Double d;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 02fc5aef40480c8ed1995c980e47969f525824bd..17db67c1fc1db6a5df63d36570d56048cefed49e 100644 (file)
@@ -30,36 +30,36 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
 
 public class EllipticalArcTo implements GeometryRow {
 
-    EllipticalArcTo _master = null;
+    EllipticalArcTo _master;
 
     // The x-coordinate of the ending vertex on an arc.
-    Double x = null;
+    Double x;
 
     // The y-coordinate of the ending vertex on an arc.
-    Double y = null;
+    Double y;
 
     // The x-coordinate of the arc's control point; a point on the arc. The
     // control point is best located about halfway between the beginning and
     // ending vertices of the arc. Otherwise, the arc may grow to an extreme
     // size in order to pass through the control point, with unpredictable
     // results.
-    Double a = null;
+    Double a;
 
     // The y-coordinate of an arc's control point.
-    Double b = null;
+    Double b;
 
     // The angle of an arc's major axis relative to the x-axis of its parent
     // shape.
-    Double c = null;
+    Double c;
 
     // The ratio of an arc's major axis to its minor axis. Despite the usual
     // meaning of these words, the "major" axis does not have to be greater than
     // the "minor" axis, so this ratio does not have to be greater than 1.
     // Setting this cell to a value less than or equal to 0 or greater than 1000
     // can lead to unpredictable results.
-    Double d = null;
+    Double d;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
@@ -129,7 +129,7 @@ public class EllipticalArcTo implements GeometryRow {
         _master = (EllipticalArcTo) row;
     }
 
-    public static int draw = 0;
+    public static int draw;
 
     @Override
     public void addToPath(java.awt.geom.Path2D.Double path, XDGFShape parent) {
index 6965c1b89fdd022300d6ccf512846312e7a2741e..0fc79c231eb14e2306e1ad2b0c6ccd2e8331753a 100644 (file)
@@ -31,25 +31,25 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
  */
 public class InfiniteLine implements GeometryRow {
 
-    InfiniteLine _master = null;
+    InfiniteLine _master;
 
     // An x-coordinate of a point on the infinite line; paired with y-coordinate
     // represented by the Y cell.
-    Double x = null;
+    Double x;
 
     // A y-coordinate of a point on the infinite line; paired with x-coordinate
     // represented by the X cell.
-    Double y = null;
+    Double y;
 
     // An x-coordinate of a point on the infinite line; paired with y-coordinate
     // represented by the B cell.
-    Double a = null;
+    Double a;
 
     // A y-coordinate of a point on an infinite line; paired with x-coordinate
     // represented by the A cell.
-    Double b = null;
+    Double b;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 93857f09bd8d67196eb1f7cb9c5e9bc6258b88c8..9c24988b386242b9de1f9766035b590ac749d6ce 100644 (file)
@@ -26,12 +26,12 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
 
 public class LineTo implements GeometryRow {
 
-    LineTo _master = null;
+    LineTo _master;
 
-    Double x = null;
-    Double y = null;
+    Double x;
+    Double y;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 6dca12b2beb8dafc609b8cc247bf85d14b892312..297b213e06d8060e9bc3f830ae32c4410c1cb1bb 100644 (file)
@@ -31,12 +31,12 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
  */
 public class MoveTo implements GeometryRow {
 
-    MoveTo _master = null;
+    MoveTo _master;
 
-    Double x = null;
-    Double y = null;
+    Double x;
+    Double y;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 353d694f9b98b05f9019d680b263c4a6346960af..f9458026518280e01b29662962c0c5f9becb3653 100644 (file)
@@ -33,30 +33,30 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
 
 public class NURBSTo implements GeometryRow {
 
-    NURBSTo _master = null;
+    NURBSTo _master;
 
     // The x-coordinate of the last control point of a NURBS.
-    Double x = null;
+    Double x;
 
     // The y-coordinate of the last control point of a NURBS.
-    Double y = null;
+    Double y;
 
     // The second to the last knot of the NURBS.
-    Double a = null;
+    Double a;
 
     // The last weight of the NURBS.
-    Double b = null;
+    Double b;
 
     // The first knot of the NURBS.
-    Double c = null;
+    Double c;
 
     // The first weight of the NURBS.
-    Double d = null;
+    Double d;
 
     // A NURBS formula.
-    String e = null;
+    String e;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index c5f1ba011a3e894a7b47bd5ddd5abcae24e1987d..4b6d37ae5dbf436eb21a113706613cf964c6a7be 100644 (file)
@@ -27,18 +27,18 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
 
 public class PolyLineTo implements GeometryRow {
 
-    PolyLineTo _master = null;
+    PolyLineTo _master;
 
     // The x-coordinate of the ending vertex of a polyline.
-    Double x = null;
+    Double x;
 
     // The y-coordinate of the ending vertex of a polyline.
-    Double y = null;
+    Double y;
 
     // The polyline formula
-    String a = null;
+    String a;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 3a419bb506e8722f6f9039d3016d975760cc0877..3988de313d07b08cd663117bb609c6d58f206540 100644 (file)
@@ -26,35 +26,35 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
 
 public class RelCubBezTo implements GeometryRow {
 
-    RelCubBezTo _master = null;
+    RelCubBezTo _master;
 
     // The x-coordinate of the ending vertex of a cubic Bezier curve relative to
     // the width of the shape.
-    Double x = null;
+    Double x;
 
     // The y-coordinate of the ending vertex of a cubic Bezier curve relative to
     // the height of the shape.
-    Double y = null;
+    Double y;
 
     // The x-coordinate of the curve's beginning control point relative to the
     // shape's width; a point on the arc. The control point is best located
     // between the beginning and ending vertices of the arc.
-    Double a = null;
+    Double a;
 
     // The y-coordinate of a curve's beginning control point relative to the
     // shape's height.
-    Double b = null;
+    Double b;
 
     // The x-coordinate of the curve's ending control point relative to the
     // shape's width; a point on the arc. The control point is best located
     // between the beginning control point and ending vertices of the arc.
-    Double c = null;
+    Double c;
 
     // The y-coordinate of a curve's ending control point relative to the
     // shape's height.
-    Double d = null;
+    Double d;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 9b58406cdc2ad88444cf4bf3f689ae5185e53913..d8fe5c69c316c5d204de9339254c18e75e4b708a 100644 (file)
@@ -26,32 +26,32 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
 
 public class RelEllipticalArcTo implements GeometryRow {
 
-    RelEllipticalArcTo _master = null;
+    RelEllipticalArcTo _master;
 
     // The x-coordinate of the ending vertex on an arc relative to the width of
     // the shape.
-    Double x = null;
+    Double x;
 
     // The y-coordinate of the ending vertex on an arc relative to the height of
     // the shape.
-    Double y = null;
+    Double y;
 
     // The x-coordinate of the arc's control point relative to the shape's
     // width; a point on the arc.
-    Double a = null;
+    Double a;
 
     // The y-coordinate of an arc's control point relative to the shape's width.
-    Double b = null;
+    Double b;
 
     // The angle of an arc's major axis relative to the x-axis of its parent.
-    Double c = null;
+    Double c;
 
     // The ratio of an arc's major axis to its minor axis. Despite the usual
     // meaning of these words, the "major" axis does not have to be greater than
     // the "minor" axis, so this ratio does not have to be greater than 1.
-    Double d = null;
+    Double d;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 1886f20590aeb854e72ba472d7c3d0b60792a5c2..dc552112955d65673882336555ac47c9d97f9cec 100644 (file)
@@ -30,12 +30,12 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
  */
 public class RelLineTo implements GeometryRow {
 
-    RelLineTo _master = null;
+    RelLineTo _master;
 
-    Double x = null;
-    Double y = null;
+    Double x;
+    Double y;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 0b6f51c19c4e0296c1b5be9b3c08b9e2283c4e21..0a2f9bf9d6b3c0e59f134f69c90515be859e2de2 100644 (file)
@@ -26,12 +26,12 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
 
 public class RelMoveTo implements GeometryRow {
 
-    RelMoveTo _master = null;
+    RelMoveTo _master;
 
-    Double x = null;
-    Double y = null;
+    Double x;
+    Double y;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index ecb4a3a434712fd682887669623c065ed2bee420..ae070254840870264ecc4b3db0725be10ebf2b8f 100644 (file)
@@ -31,26 +31,26 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
  */
 public class RelQuadBezTo implements GeometryRow {
 
-    RelQuadBezTo _master = null;
+    RelQuadBezTo _master;
 
     // The x-coordinate of the ending vertex of a quadratic Bezier curve
     // relative to the width of the shape.
-    Double x = null;
+    Double x;
 
     // The y-coordinate of the ending vertex of a quadratic Bezier curve
     // relative to the height of the shape.
-    Double y = null;
+    Double y;
 
     // The x-coordinate of the curve's control point relative to the shape's
     // width; a point on the arc. The control point is best located about
     // halfway between the beginning and ending vertices of the arc.
-    Double a = null;
+    Double a;
 
     // The y-coordinate of a curve's control point relative to the shape's
     // height.
-    Double b = null;
+    Double b;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index f75490b073328ef11680d4886b775dcef84a73c5..640b10ea48e8372be8f48a2ad0cd0281890afc4a 100644 (file)
@@ -30,18 +30,18 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
  */
 public class SplineKnot implements GeometryRow {
 
-    SplineKnot _master = null;
+    SplineKnot _master;
 
     // The x-coordinate of a control point.
-    Double x = null;
+    Double x;
 
     // The y-coordinate of a control point.
-    Double y = null;
+    Double y;
 
     // One of the spline's knots (other than the last one or the first two).
-    Double a = null;
+    Double a;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index 224a36c036384f9c67a524720a0826d08b4b61a3..a427de6f1fe74c576813acf398ade299b055c3fc 100644 (file)
@@ -29,27 +29,27 @@ import com.microsoft.schemas.office.visio.x2012.main.RowType;
  */
 public class SplineStart implements GeometryRow {
 
-    SplineStart _master = null;
+    SplineStart _master;
 
     // The x-coordinate of a spline's second control point.
-    Double x = null;
+    Double x;
 
     // The y-coordinate of a spline's second control point.
-    Double y = null;
+    Double y;
 
     // The second knot of the spline.
-    Double a = null;
+    Double a;
 
     // The first knot of a spline.
-    Double b = null;
+    Double b;
 
     // The last knot of a spline.
-    Double c = null;
+    Double c;
 
     // The degree of a spline (an integer from 1 to 25).
-    Integer d = null;
+    Integer d;
 
-    Boolean deleted = null;
+    Boolean deleted;
 
     // TODO: support formulas
 
index d4a010ba26fe550d8b8385533e6db4c750458db5..062f987ab39a64cf57db94fcc64bf3bd34e49744 100644 (file)
@@ -25,7 +25,7 @@ import org.apache.poi.xdgf.usermodel.XDGFShape;
 
 public class ShapeDebuggerRenderer extends ShapeRenderer {
 
-    ShapeVisitorAcceptor _debugAcceptor = null;
+    ShapeVisitorAcceptor _debugAcceptor;
 
     public ShapeDebuggerRenderer() {
         super();
index d3ff89613f362d8d56c42aab94ddaff92e594b18..6e96f0e2b5bedeac4205ae3f43f2f87fbcb39e73 100644 (file)
@@ -49,8 +49,8 @@ public class XSLFPowerPointExtractor extends POIXMLTextExtractor {
    
        private XMLSlideShow slideshow;
        private boolean slidesByDefault = true;
-       private boolean notesByDefault = false;
-   private boolean masterByDefault = false;
+       private boolean notesByDefault;
+   private boolean masterByDefault;
        
        public XSLFPowerPointExtractor(XMLSlideShow slideshow) {
                super(slideshow);
index 95abdebf2bae2a920b2e839f5bd865a3d8e1e3cd..bfff18d83c71b5f5677ed28797647a7a380e73f1 100644 (file)
@@ -43,10 +43,10 @@ import org.apache.poi.util.Units;
  */
 @Beta
 public final class XSLFPictureData extends POIXMLDocumentPart implements PictureData {
-    private Long checksum = null;
+    private Long checksum;
 
     // original image dimensions (for formats supported by BufferedImage)
-    private Dimension origSize = null;
+    private Dimension origSize;
     private int index = -1;
 
     /**
index b159dcaec1431d0f4ca1527f17aa784b8ff844fb..589f84e91821986406e7e2c38c7fec55c51bac4b 100644 (file)
@@ -69,14 +69,14 @@ import org.openxmlformats.schemas.drawingml.x2006.main.STTextVerticalType;
  * Represents a cell of a table in a .pptx presentation
  */
 public class XSLFTableCell extends XSLFTextShape implements TableCell<XSLFShape,XSLFTextParagraph> {
-    private CTTableCellProperties _tcPr = null;
+    private CTTableCellProperties _tcPr;
     private final XSLFTable table;
-    private int row = 0, col = 0;
+    private int row, col;
 
     /**
      * Volatile/temporary anchor - e.g. for rendering
      */
-    private Rectangle2D anchor = null;
+    private Rectangle2D anchor;
 
     /*package*/ XSLFTableCell(CTTableCell cell, XSLFTable table){
         super(cell, table.getSheet());
index 6504a6df166210be1a0c56106bd2d798671eacc4..fa81c44b3850523472d1afc110f0aa480368fa11 100644 (file)
@@ -42,9 +42,9 @@ public class XSSFBCommentsTable extends XSSFBParser {
 
     //these are all used only during parsing, and they are mutable!
     private int authorId = -1;
-    private CellAddress cellAddress = null;
-    private XSSFBCellRange cellRange = null;
-    private String comment = null;
+    private CellAddress cellAddress;
+    private XSSFBCellRange cellRange;
+    private String comment;
     private StringBuilder authorBuffer = new StringBuilder();
 
 
index 819281f6506522f7b5f8bfeb0efac331000ebde2..639300df1e05b14fe16ac2ac63e31830f4e140a1 100644 (file)
@@ -47,9 +47,9 @@ public class XSSFBSheetHandler extends XSSFBParser {
 
     private int lastEndedRow = -1;
     private int lastStartedRow = -1;
-    private int currentRow = 0;
+    private int currentRow;
     private byte[] rkBuffer = new byte[8];
-    private XSSFBCellRange hyperlinkCellRange = null;
+    private XSSFBCellRange hyperlinkCellRange;
     private StringBuilder xlWideStringBuffer = new StringBuilder();
 
     private final XSSFBCellHeader cellBuffer = new XSSFBCellHeader();
index 583c9fcecfdec24ac46dd1cf53dac000b053cd30..6394074ba8e3539de05b35d8cadb6199a1a6c1b3 100644 (file)
@@ -40,8 +40,8 @@ public class XSSFBStylesTable extends XSSFBParser {
     private final SortedMap<Short, String> numberFormats = new TreeMap<Short,String>();
     private final List<Short> styleIds = new ArrayList<Short>();
 
-    private boolean inCellXFS = false;
-    private boolean inFmts = false;
+    private boolean inCellXFS;
+    private boolean inFmts;
     public XSSFBStylesTable(InputStream is) throws IOException {
         super(is);
         parse();
index 6653ee655dcee3cafecfcbd42a09dda7f3ead250..aa1f2b214877ac2fe1e0b2e68c6bddd34b46581c 100644 (file)
@@ -183,7 +183,7 @@ public class XSSFBReader extends XSSFReader {
         static {
             RECORDS.set(XSSFBRecordType.BrtAbsPath15.getId());
         }
-        private String path = null;
+        private String path;
         public PathExtractor(InputStream is) {
             super(is, RECORDS);
         }
index 4e2a5c27b9997ba0cc29d589a1319494f5aa3402..a55686f79765151ac24185f3328dfda7c5bddba0 100644 (file)
@@ -51,7 +51,7 @@ public class XSSFBEventBasedExcelExtractor extends XSSFEventBasedExcelExtractor
             XSSFRelation.XLSB_BINARY_WORKBOOK
     };
 
-    private boolean handleHyperlinksInCells = false;
+    private boolean handleHyperlinksInCells;
 
     public XSSFBEventBasedExcelExtractor(String path) throws XmlException, OpenXML4JException, IOException {
         super(path);
index dd14c6cd08b8a4b9b01548216f171fbf6cbc43d5..b80df396066c76535fb48d30985207de4a0d0941 100644 (file)
@@ -65,9 +65,9 @@ public class XSSFEventBasedExcelExtractor extends POIXMLTextExtractor
     private Locale locale;
     private boolean includeTextBoxes = true;
     private boolean includeSheetNames = true;
-    private boolean includeCellComments = false;
+    private boolean includeCellComments;
     private boolean includeHeadersFooters = true;
-    private boolean formulasNotResults = false;
+    private boolean formulasNotResults;
     private boolean concatenatePhoneticRuns = true;
 
     public XSSFEventBasedExcelExtractor(String path) throws XmlException, OpenXML4JException, IOException {
index 03a29a367455120a2fc7b2b368c6f26bb68f325d..06b02c9bcc01d78323145bd47cf5752dbcd8208d 100644 (file)
@@ -59,7 +59,7 @@ import org.apache.poi.util.Internal;
     // untrackedColumns stores columns have been explicitly untracked so they aren't implicitly re-tracked by trackAllColumns
     // Using a HashSet instead of a TreeSet because we don't care about order.
     private final Set<Integer> untrackedColumns = new HashSet<Integer>();
-    private boolean trackAllColumns = false;
+    private boolean trackAllColumns;
 
     /**
      * Tuple to store the column widths considering and not considering merged cells
index 5eebd7eb801f6a4549afde8e15d7dcc01c5f887e..1ab5c8a231a183660e12843f7b16fa1c54a2df6e 100644 (file)
@@ -42,8 +42,8 @@ public class SXSSFRow implements Row, Comparable<SXSSFRow>
     private final SortedMap<Integer, SXSSFCell> _cells = new TreeMap<Integer, SXSSFCell>();
     private short _style = -1; // index of cell style in style table
     private short _height = -1; // row height in twips (1/20 point)
-    private boolean _zHeight = false; // row zero-height (this is somehow different than being hidden)
-    private int _outlineLevel = 0;   // Outlining level of the row, when outlining is on
+    private boolean _zHeight; // row zero-height (this is somehow different than being hidden)
+    private int _outlineLevel;   // Outlining level of the row, when outlining is on
     // use Boolean to have a tri-state for on/off/undefined 
     private Boolean _hidden = UNDEFINED;
     private Boolean _collapsed = UNDEFINED;
@@ -490,7 +490,7 @@ public class SXSSFRow implements Row, Comparable<SXSSFRow>
     public class CellIterator implements Iterator<Cell>
     {
         final int maxColumn = getLastCellNum(); //last column PLUS ONE
-        int pos = 0;
+        int pos;
 
         @Override
         public boolean hasNext()
index 6fce529456e65ffb0a79dcc96528934c3cd91ffc..78a8a4916e891af97aba86c1b256624781169ae7 100644 (file)
@@ -70,9 +70,9 @@ public class SXSSFSheet implements Sheet
     private final SheetDataWriter _writer;
     private int _randomAccessWindowSize = SXSSFWorkbook.DEFAULT_WINDOW_SIZE;
     private final AutoSizeColumnTracker _autoSizeColumnTracker;
-    private int outlineLevelRow = 0;
+    private int outlineLevelRow;
     private int lastFlushedRowNumber = -1;
-    private boolean allFlushed = false;
+    private boolean allFlushed;
 
     public SXSSFSheet(SXSSFWorkbook workbook, XSSFSheet xSheet) throws IOException {
         _workbook = workbook;
index 9c5e6ffb10212ddeed5d7ac6456973ba808fa2b7..e6400c44766030d0c646663cccdad1e065e1212b 100644 (file)
@@ -56,7 +56,7 @@ public abstract class BaseXSSFEvaluationWorkbook implements FormulaRenderingWork
 
     // lazily populated. This should only be accessed through getTableCache
     // keys are lower-case to make this a quasi-case-insensitive map
-    private Map<String, XSSFTable> _tableCache = null;
+    private Map<String, XSSFTable> _tableCache;
 
 
     protected BaseXSSFEvaluationWorkbook(XSSFWorkbook book) {
index f0d9d12af5f9bec48e54a286a772e90b5e43b3d9..78d4e402e4f4d4e2c0ef7f58d1e0d618ea95f52a 100644 (file)
@@ -42,7 +42,7 @@ import org.apache.poi.util.Internal;
  */
 public final class XSSFConnector extends XSSFShape {
 
-    private static CTConnector prototype = null;
+    private static CTConnector prototype;
 
     private CTConnector ctShape;
 
index 7078f3c09d4a2df58f37e9baf5bd8537878b116a..b67c7eb4490ed2ef11bea5029cf758d47fa0fbd4 100644 (file)
@@ -83,7 +83,7 @@ public final class XSSFDrawing extends POIXMLDocumentPart implements Drawing<XSS
      * Root element of the SpreadsheetML Drawing part
      */
     private CTDrawing drawing;
-    private long numOfGraphicFrames = 0L;
+    private long numOfGraphicFrames;
 
     protected static final String NAMESPACE_A = XSSFRelation.NS_DRAWINGML;
     protected static final String NAMESPACE_C = XSSFRelation.NS_CHART;
index fff0005518fa0ae4dab66f5c4abe0162ed2b49d4..a2e95c3ea7c677feeb87a874642bc693f5a6ad53 100644 (file)
@@ -43,7 +43,7 @@ import org.w3c.dom.NodeList;
  */
 public final class XSSFGraphicFrame extends XSSFShape {
 
-       private static CTGraphicalObjectFrame prototype = null;
+       private static CTGraphicalObjectFrame prototype;
 
        private CTGraphicalObjectFrame graphicFrame;
 
index a928956be5f7408aec3bc87276a05d54c9fd2957..e54e25fd5fdce4b0a8c2c0dc2f5ca2a36cce6b96 100644 (file)
@@ -57,7 +57,7 @@ public class XSSFObjectData extends XSSFSimpleShape implements ObjectData {
     /**
      * A default instance of CTShape used for creating new shapes.
      */
-    private static CTShape prototype = null;
+    private static CTShape prototype;
 
     private CTOleObject oleObject;
 
index 2d8bffb15ade985221263f572b004ded48bdcb3b..85eb35a6e92c444b8c99782499a999aeb848290b 100644 (file)
@@ -60,7 +60,7 @@ public final class XSSFPicture extends XSSFShape implements Picture {
     /**
      * A default instance of CTShape used for creating new shapes.
      */
-    private static CTPicture prototype = null;
+    private static CTPicture prototype;
 
     /**
      * This object specifies a picture object and all its properties
index 60e090456ee8ee6a5a17d278c653e7c8e9b7a768..31d5964c86fd4e2db705c3f0b0ffafe81f0932b5 100644 (file)
@@ -42,7 +42,7 @@ import org.openxmlformats.schemas.drawingml.x2006.spreadsheetDrawing.CTShape;
  * specified just as they normally would.
  */
 public final class XSSFShapeGroup extends XSSFShape implements ShapeContainer<XSSFShape> {
-    private static CTGroupShape prototype = null;
+    private static CTGroupShape prototype;
 
     private CTGroupShape ctGroup;
 
index a3e78dac32bd7e5ff3b8ce0529ee1e5723f7e182..08e35f30e56e3216735b6b46c24cf65f97aeb033 100644 (file)
@@ -46,7 +46,7 @@ public class XSSFSimpleShape extends XSSFShape implements Iterable<XSSFTextParag
     /**
      * A default instance of CTShape used for creating new shapes.
      */
-    private static CTShape prototype = null;
+    private static CTShape prototype;
 
     /**
      *  Xml bean that stores properties of this shape
index 62267f2c79b8b545340fca2aeb2e127dece4d695..b9d0841d3fb6310836284cc74eb8754f0eea4328 100644 (file)
@@ -124,7 +124,7 @@ public abstract class XSSFHeaderFooter implements HeaderFooter {
        private HeaderFooterHelper helper;
        private CTHeaderFooter headerFooter;
 
-       private boolean stripFields = false;
+       private boolean stripFields;
 
        /**
         * Create an instance of XSSFHeaderFooter from the supplied XML bean
index f02982949a236330e0e5a8c60f3471348a1ed1aa..aaf445362302229c546a0ebe466eaaff50cd0d42 100644 (file)
@@ -53,7 +53,7 @@ public class XWPFWordExtractor extends POIXMLTextExtractor {
     };
 
     private XWPFDocument document;
-    private boolean fetchHyperlinks = false;
+    private boolean fetchHyperlinks;
     private boolean concatenatePhoneticRuns = true;
 
     public XWPFWordExtractor(OPCPackage container) throws XmlException, OpenXML4JException, IOException {
index f0f2d316a03b54d691df1df93388de82051e9abd..4cd688c205534b30739eb9cde8fede37214743a5 100644 (file)
@@ -25,7 +25,7 @@ package org.apache.poi.xwpf.usermodel;
  * 3rd CharacterPosition
  */
 public class PositionInParagraph {
-    private int posRun = 0, posText = 0, posChar = 0;
+    private int posRun, posText, posChar;
 
     public PositionInParagraph() {
     }
index d72462ddee69a308e9619cdf33a86177bc4018f0..e20611c60fdf009f60c52139eccc0a2e5eeefe46 100644 (file)
@@ -64,12 +64,12 @@ public class XWPFTableCell implements IBody, ICell {
     }
 
     private final CTTc ctTc;
-    protected List<XWPFParagraph> paragraphs = null;
-    protected List<XWPFTable> tables = null;
-    protected List<IBodyElement> bodyElements = null;
+    protected List<XWPFParagraph> paragraphs;
+    protected List<XWPFTable> tables;
+    protected List<IBodyElement> bodyElements;
 
     protected IBody part;
-    private XWPFTableRow tableRow = null;
+    private XWPFTableRow tableRow;
 
     /**
      * If a table cell does not include at least one block-level element, then this document shall be considered corrupt
index 991107bf0b9d5fe00e887ca1428f8d285f228627..f93e47b7e2c3cbcbf0a05655b7f53216d8de7332 100644 (file)
@@ -101,8 +101,8 @@ public class TestSignatureInfo {
     private static final POIDataSamples testdata = POIDataSamples.getXmlDSignInstance();
 
     private static Calendar cal;
-    private KeyPair keyPair = null;
-    private X509Certificate x509 = null;
+    private KeyPair keyPair;
+    private X509Certificate x509;
 
     @AfterClass
     public static void removeUserLocale() {
index 809a307d5078ba364ad2a56bcadda8b7fa1db76e..45f92e8b24d33b5b9293a7a2eda20a8d9005c1bd 100644 (file)
@@ -42,7 +42,7 @@ import org.junit.Test;
 public class TestDrawPictureShape {
     final static POIDataSamples ssSamples = POIDataSamples.getSlideShowInstance();
 
-    private static boolean xslfOnly = false;
+    private static boolean xslfOnly;
 
     @BeforeClass
     public static void checkHslf() {
index 50ad6347a42477ebd66c16e1df3230f1dbc0d4d4..b77550f7861a8858dd14623bf378978030c68a84 100644 (file)
@@ -43,7 +43,7 @@ import org.junit.runners.Parameterized.Parameters;
  */
 @RunWith(Parameterized.class)
 public class TestPPTX2PNG {
-    private static boolean xslfOnly = false;
+    private static boolean xslfOnly;
     private static final POIDataSamples samples = POIDataSamples.getSlideShowInstance();
     private static final File basedir = null;
     private static final String files =
index c7029ad3829b909b26bb0d388d67ed5c7abb57af..8856a2a645d7a2ec0db540387a6e7178f923971b 100644 (file)
@@ -49,7 +49,7 @@ import org.openxmlformats.schemas.presentationml.x2006.main.CTPlaceholder;
 import org.openxmlformats.schemas.presentationml.x2006.main.STPlaceholderType;
 
 public class TestXSLFTextShape {
-    private static boolean xslfOnly = false;
+    private static boolean xslfOnly;
 
     @BeforeClass
     public static void checkHslf() {
index d79c43c87b4402137d7763453f0f1cf3c41623c0..41864e95a118b2e4c3fe283355c850b580c6ff1c 100644 (file)
@@ -44,21 +44,21 @@ import java.io.OutputStream;
        // And how long it is
        // (Un-compressed codes are 1 byte each, compressed codes
        //   are two)
-       private int bufferLen = 0;
+       private int bufferLen;
 
        // The raw length of a code is limited to 4 bits + 2
        private byte[] rawCode = new byte[18];
        // And how much we're using
-       private int rawCodeLen = 0;
+       private int rawCodeLen;
 
        // How far through the input and output streams we are
-       private int posInp = 0;
-       private int posOut = 0;
+       private int posInp;
+       private int posOut;
 
        // What the next mask byte to output will be
-       private int nextMask = 0;
+       private int nextMask;
        // And how many bits we've already set
-       private int maskBitsSet = 0;
+       private int maskBitsSet;
 
        public HDGFLZWCompressor() {}
        
index 2fae8888d7da125a260b3d954076e7f9eb8abd7d..24ba19653adf71b62de275c903ced0e481dc7a29 100644 (file)
@@ -34,7 +34,7 @@ public final class CompressedStreamStore extends StreamStore {
         *  real contents in the de-compressed data
         */
        private byte[] blockHeader = new byte[4];
-       private boolean blockHeaderInContents = false;
+       private boolean blockHeaderInContents;
 
        protected byte[] _getCompressedContents() { return compressedContents; }
        protected byte[] _getBlockHeader() { return blockHeader; }
index 05379e552b184105f1e3b0aa5d5d2b268ce11c5e..ab4add4eba98f0a38cbf00b445d7184e89dd78a4 100644 (file)
@@ -59,7 +59,7 @@ public class HemfExtractor implements Iterable<HemfRecord> {
 
     private class HemfRecordIterator implements Iterator<HemfRecord> {
 
-        private HemfRecord currentRecord = null;
+        private HemfRecord currentRecord;
 
         HemfRecordIterator() {
             //queue the first non-header record
index a0dc8b9afa6a4f803c7445debe6f2b410e076ad6..af3018ce7f4a93431be6b765486900828f3a718b 100644 (file)
@@ -35,7 +35,7 @@ import org.apache.poi.poifs.filesystem.POIFSFileSystem;
  */
 public final class PublisherTextExtractor extends POIOLE2TextExtractor {
    private HPBFDocument doc;
-   private boolean hyperlinksByDefault = false;
+   private boolean hyperlinksByDefault;
 
    public PublisherTextExtractor(HPBFDocument doc) {
       super(doc);
index 88d8a6198d864d09c1632b70599eb2cd4a0f9af0..b5f2643c4323eaef631096b53f4d1e55438499fd 100644 (file)
@@ -66,7 +66,7 @@ public abstract class Metafile extends HSLFPictureData {
         /**
          * Reserved. Always 0.
          */
-        private int compression = 0;
+        private int compression;
 
         /**
          * Reserved. Always 254.
index 7e09764e195fc0347225e71fa01ed877ea3d5823..247cd8a8819df5bdea660a215abeb94aebaa9c28 100644 (file)
@@ -58,9 +58,9 @@ public final class PowerPointExtractor extends POIOLE2TextExtractor {
    private final List<HSLFSlide> _slides;
 
    private boolean _slidesByDefault = true;
-   private boolean _notesByDefault = false;
-   private boolean _commentsByDefault = false;
-   private boolean _masterByDefault = false;
+   private boolean _notesByDefault;
+   private boolean _commentsByDefault;
+   private boolean _masterByDefault;
 
        /**
         * Basic extractor. Returns all the text, and optionally all the notes
index e82b966e60e41b2598faddc6a723d1f4767506c4..45ef1b7f902b4c13c0c79f43f97c08fca01f3772 100644 (file)
@@ -93,9 +93,9 @@ public class TextPropCollection {
        
     // indentLevel is only valid for paragraph collection
     // if it's set to -1, it must be omitted - see 2.9.36 TextMasterStyleLevel
-    private short indentLevel = 0;
+    private short indentLevel;
        private final Map<String,TextProp> textProps = new HashMap<String,TextProp>();
-    private int maskSpecial = 0;
+    private int maskSpecial;
     private final TextPropType textPropType;
     
     /**
index a5e120d8299dbbbb3d974cdbaeb3de7ac89e2ca9..9d984180eb4c717e2599270124c8f0f4a0f9a1ec 100644 (file)
@@ -32,9 +32,9 @@ public class EscherPlaceholder extends EscherRecord {
     public static final String RECORD_DESCRIPTION = "msofbtClientTextboxPlaceholder";
 
     private int position = -1;
-    private byte placementId = 0;
-    private byte size = 0;
-    private short unused = 0;
+    private byte placementId;
+    private byte size;
+    private short unused;
 
     public EscherPlaceholder() {}
 
index 3bdea4e4b2e5d2de36854eb1ddb26fe67228e8dd..e91ddd0421c6cafd96521d526fb6d30aecd41c48 100644 (file)
@@ -53,7 +53,7 @@ public final class OEPlaceholderAtom extends RecordAtom{
     private int placementId;
     private int placeholderId;
     private int placeholderSize;
-    private short unusedShort = 0;
+    private short unusedShort;
 
 
     /**
index fc6b3795aa85877117b24a1f2fe1a1d572ce0488..f13cd756adc5e7e0913da04fa08346dd24cd33cd 100644 (file)
@@ -118,18 +118,18 @@ public class SSSlideInfoAtom extends RecordAtom {
      * before advancing to the next presentation slide. It MUST be greater than or equal to 0 and
      * less than or equal to 86399000. It MUST be ignored unless AUTO_ADVANCE_BIT is TRUE.
      */
-    private int _slideTime = 0;
+    private int _slideTime;
     
     /**
      * A SoundIdRef that specifies which sound to play when the transition starts. 
      */
-    private int _soundIdRef = 0;
+    private int _soundIdRef;
 
     /**
      * A byte that specifies the variant of effectType. In combination of the effectType
      * there are further restriction and specification of this field.
      */
-    private short _effectDirection = 0; // byte
+    private short _effectDirection; // byte
     
     /**
      * A byte that specifies which transition is used when transitioning to the
@@ -137,18 +137,18 @@ public class SSSlideInfoAtom extends RecordAtom {
      * determined by the rendering application. As such, the same transition can have
      * many variations depending on the implementation.
      */
-    private short _effectType = 0; // byte
+    private short _effectType; // byte
     
     /**
      * Various flags - see bitmask for more details
      */
-    private short _effectTransitionFlags = 0;
+    private short _effectTransitionFlags;
     
     /**
      * A byte value that specifies how long the transition takes to run.
      * (0x00 = 0.75 seconds, 0x01 = 0.5 seconds, 0x02 = 0.25 seconds) 
      */
-    private short _speed = 0; // byte
+    private short _speed; // byte
     private byte[] _unused; // 3-byte
 
     public SSSlideInfoAtom() {
index 5291eb2fe32317e3bc414732f2af46506c5df5eb..3940e922291b4817f3b8104900328dfef446d00a 100644 (file)
@@ -55,7 +55,7 @@ public final class StyleTextPropAtom extends RecordAtom {
      * Only set to true once setParentTextSize(int) is called.
      * Until then, no stylings will have been decoded
      */
-    private boolean initialised = false;
+    private boolean initialised;
 
     /**
      * The list of all the different paragraph stylings we code for.
index c76699abd54387272b763e9497918abfa2c01252..7ab311ecf2e301251865fdadc01f9d12c47efa93 100644 (file)
@@ -120,7 +120,7 @@ public class TextSpecInfoRun {
     private short bidi = -1;
     
     private int pp10extMask = -1;
-    private byte[] smartTagsBytes = null;
+    private byte[] smartTagsBytes;
 
     /**
      * Inits a TextSpecInfoRun with default values
index b56b55381efd81b2f35a3bc016813090f1d21c88..f2cc64c5156ce3006900d5a0b86ff48aae2002f4 100644 (file)
@@ -35,7 +35,7 @@ import org.apache.poi.util.BitFieldFactory;
 public class HSLFFontInfo implements FontInfo {
 
     public enum FontRenderType {
-        raster, device, truetype;
+        raster, device, truetype
     }
     
     /** A bit that specifies whether a subset of this font is embedded. */
@@ -51,7 +51,7 @@ public class HSLFFontInfo implements FontInfo {
     private FontRenderType renderType = FontRenderType.truetype;
     private FontFamily family = FontFamily.FF_SWISS;
     private FontPitch pitch = FontPitch.VARIABLE;
-    private boolean isSubsetted = false;
+    private boolean isSubsetted;
     private boolean isSubstitutable = true;
 
     /**
index 83925bc540d3bc5e785e12ab01a71475368e79ed..a2b6c3cdb818a80e1d4e43b4f351db2c8f087ecc 100644 (file)
@@ -56,7 +56,7 @@ public class HSLFSlideShowEncrypted implements Closeable {
     DocumentEncryptionAtom dea;
     EncryptionInfo _encryptionInfo;
 //    Cipher cipher = null;
-    ChunkedCipherOutputStream cyos = null;
+    ChunkedCipherOutputStream cyos;
 
     private static final BitField fieldRecInst = new BitField(0xFFF0);
 
index 814d588340e39db330e4ec0bc76a6f1e3119ecaa..5220a3fd7679a64971865165823cb8817c1e89ae 100644 (file)
@@ -861,7 +861,7 @@ public final class HSLFSlideShowImpl extends POIDocument implements Closeable {
     }
 
     private static class CountingOS extends OutputStream {
-        int count = 0;
+        int count;
 
         @Override
         public void write(int b) throws IOException {
index 97ff5b4c832ff9d0f16125c2d58cdf762e48a3b1..263d45844d82eb0ca1819395eb84b21aa377ff5c 100644 (file)
@@ -103,7 +103,7 @@ public final class HSLFTextParagraph implements TextParagraph<HSLFShape,HSLFText
 
     private StyleTextProp9Atom styleTextProp9Atom;
 
-    private boolean _dirty = false;
+    private boolean _dirty;
 
     private final List<HSLFTextParagraph> parentList;
 
index 98c2db8d042c2a9973ee714ef161f860fea5bb0a..5a5d5dc94231b8a5d82079fd3a3c49afcc2af997 100644 (file)
@@ -85,7 +85,7 @@ public class MAPIMessage extends POIReadOnlyDocument {
    private RecipientChunks[] recipientChunks;
    private AttachmentChunks[] attachmentChunks;
 
-   private boolean returnNullOnMissingChunk = false;
+   private boolean returnNullOnMissingChunk;
 
    /**
     * Constructor for creating new files.
index a3d1624111467601bfd5dae2ac7284b2ad30cf16..920c1aeb06f8359adeb8c68cc04030c833bca590 100644 (file)
@@ -57,9 +57,9 @@ public abstract class AbstractExcelConverter
 
     private boolean outputColumnHeaders = true;
 
-    private boolean outputHiddenColumns = false;
+    private boolean outputHiddenColumns;
 
-    private boolean outputHiddenRows = false;
+    private boolean outputHiddenRows;
 
     private boolean outputLeadingSpacesAsNonBreaking = true;
 
index c1fab638c6fd33224f6742d4f31fcbbf325ca475..c2769861e689c3bf20d172892668df3b668d053f 100644 (file)
@@ -158,9 +158,9 @@ public class ExcelToHtmlConverter extends AbstractExcelConverter
         return doc;
     }
 
-    private String cssClassContainerCell = null;
+    private String cssClassContainerCell;
 
-    private String cssClassContainerDiv = null;
+    private String cssClassContainerDiv;
 
     private String cssClassPrefixCell = "c";
 
@@ -174,7 +174,7 @@ public class ExcelToHtmlConverter extends AbstractExcelConverter
 
     private final HtmlDocumentFacade htmlDocumentFacade;
 
-    private boolean useDivsToSpan = false;
+    private boolean useDivsToSpan;
 
     public ExcelToHtmlConverter( Document doc )
     {
index 243393db96b61424270164904dc3c10f54376137..bd8c9ff9a9c95ac6332fb6327ddd8e8d66deb233 100644 (file)
@@ -41,24 +41,24 @@ import org.apache.poi.hwmf.record.HwmfText.HwmfTextVerticalAlignment;
 
 public class HwmfDrawProperties {
     private final Rectangle2D window;
-    private Rectangle2D viewport = null;
+    private Rectangle2D viewport;
     private final Point2D location;
     private HwmfMapMode mapMode = HwmfMapMode.MM_ANISOTROPIC;
     private HwmfColorRef backgroundColor = new HwmfColorRef(Color.BLACK);
     private HwmfBrushStyle brushStyle = HwmfBrushStyle.BS_SOLID;
     private HwmfColorRef brushColor = new HwmfColorRef(Color.BLACK);
     private HwmfHatchStyle brushHatch = HwmfHatchStyle.HS_HORIZONTAL;
-    private BufferedImage brushBitmap = null;
+    private BufferedImage brushBitmap;
     private double penWidth = 1;
     private HwmfPenStyle penStyle = HwmfPenStyle.valueOf(0);
     private HwmfColorRef penColor = new HwmfColorRef(Color.BLACK);
     private double penMiterLimit = 10;
     private HwmfBkMode bkMode = HwmfBkMode.OPAQUE;
     private HwmfPolyfillMode polyfillMode = HwmfPolyfillMode.WINDING;
-    private Shape region = null;
-    private List<PaletteEntry> palette = null;
-    private int paletteOffset = 0;
-    private HwmfFont font = null;
+    private Shape region;
+    private List<PaletteEntry> palette;
+    private int paletteOffset;
+    private HwmfFont font;
     private HwmfColorRef textColor = new HwmfColorRef(Color.BLACK);
     private HwmfTextAlignment textAlignLatin = HwmfTextAlignment.LEFT;
     private HwmfTextVerticalAlignment textVAlignLatin = HwmfTextVerticalAlignment.TOP;
index 34a677fa29272283db6cb947ef8f7c0c30f1a99c..e2601bc65ecd6582fe0894edc6a0dd43ad3e2205 100644 (file)
@@ -39,8 +39,8 @@ import org.apache.poi.util.Units;
  * via reflection
  */
 public class HwmfSLImageRenderer implements ImageRenderer {
-    HwmfPicture image = null;
-    double alpha = 0;
+    HwmfPicture image;
+    double alpha;
     
     @Override
     public void loadImage(InputStream data, String contentType) throws IOException {
index b9522730e6f5944b226cf45b3bdf14c78977f100..82f593963ecef156fc18d26f4075f594172b3812 100644 (file)
@@ -210,7 +210,7 @@ public class HwmfBitmapDib {
     private long headerColorImportant = -1;
     private Color colorTable[];
     @SuppressWarnings("unused")
-    private int colorMaskR=0,colorMaskG=0,colorMaskB=0;
+    private int colorMaskR,colorMaskG,colorMaskB;
 
     // size of header and color table, for start of image data calculation
     private int introSize;
index 3386f4e25becedf205827b891359bba2ebdb4884..daf86e7cccddcc6cdc77034e9e0c2a5f68160d63 100644 (file)
@@ -109,7 +109,7 @@ public class WordToFoConverter extends AbstractWordConverter
 
     private AtomicInteger internalLinkCounter = new AtomicInteger( 0 );
 
-    private boolean outputCharactersLanguage = false;
+    private boolean outputCharactersLanguage;
 
     private Set<String> usedIds = new LinkedHashSet<String>();
 
index ba88a905a84578296508a4feb06c20b2c1b7f1c6..0cdc68d63f6a076fcf46182026ccd91a2fffed2c 100644 (file)
@@ -126,9 +126,9 @@ public class WordToTextConverter extends AbstractWordConverter
 
     private AtomicInteger noteCounters = new AtomicInteger( 1 );
 
-    private Element notes = null;
+    private Element notes;
 
-    private boolean outputSummaryInformation = false;
+    private boolean outputSummaryInformation;
 
     private final TextDocumentFacade textDocumentFacade;
 
index dc25a83074984f0753fa4bc9181ab6a7bbc9281c..32105686e98bc16fdbb0177889271aac6ae9f33e 100644 (file)
@@ -46,7 +46,7 @@ public final class FontTable
     private int fcSttbfffn;// table stream offset for sttbfffn
 
     // FFN structure containing strings of font names
-    private Ffn[] _fontNames = null;
+    private Ffn[] _fontNames;
 
 
     public FontTable(byte[] buf, int offset, int lcbSttbfffn)
index ce4df164be4b605839aeaf793cf919b7e1204b79..e692d0c1e7ff6de9d981631015e6c0bd33305f37 100644 (file)
@@ -122,9 +122,9 @@ public class BookmarksImpl implements Bookmarks
 
     private final BookmarksTables bookmarksTables;
 
-    private Map<Integer, List<GenericPropertyNode>> sortedDescriptors = null;
+    private Map<Integer, List<GenericPropertyNode>> sortedDescriptors;
 
-    private int[] sortedStartPositions = null;
+    private int[] sortedStartPositions;
 
     public BookmarksImpl( BookmarksTables bookmarksTables )
     {
index 3364aecb080b097a1be6edf380c7131c0a9b8f46..dff4e56a66e13f2e13fbbf152753c358f9984c4a 100644 (file)
@@ -48,7 +48,7 @@ import org.apache.poi.hwpf.sprm.ParagraphSprmCompressor;
  */
 public final class HWPFList
 {
-    private boolean _ignoreLogicalLeftIdentation = false;
+    private boolean _ignoreLogicalLeftIdentation;
     private LFO _lfo;
     private LFOData _lfoData;
     private ListData _listData;
index 84a0e9b34a4c0eb4ecca693ae23c4322c98496fe..16ae1c40deaca02692bd6404525d52219e62b7be 100644 (file)
@@ -37,7 +37,7 @@ public final class HeaderStories {
        private Range headerStories;
        private PlexOfCps plcfHdd;
 
-       private boolean stripFields = false;
+       private boolean stripFields;
 
        public HeaderStories(HWPFDocument doc) {
                this.headerStories = doc.getHeaderStoryRange();
index ec3b17f695ea11aae6b334bd8c973876dad3f447..54a0c959692d8bd2e1e763267ece3204b77fbc5c 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.poi.hwpf.model.NotesTables;
  */
 public class NotesImpl implements Notes
 {
-    private Map<Integer, Integer> anchorToIndexMap = null;
+    private Map<Integer, Integer> anchorToIndexMap;
 
     private final NotesTables notesTables;
 
index 1dbeae4f8621e2084c1d79128a4b8c21f1120975..6b2fdfc6d0e6a9ec1d3a8277d62d3d9b30b19d39 100644 (file)
@@ -23,7 +23,7 @@ public final class ParagraphProperties extends PAPAbstractType implements
         Cloneable
 {
 
-    private boolean jcLogical = false;
+    private boolean jcLogical;
 
     public ParagraphProperties()
     {
index 928dd188fad7fa5de3842269fa9bdb721b4be897..6b5a51529e9aa336bc2f23246ef0ff33b9f6693f 100644 (file)
@@ -45,7 +45,7 @@ public class PictureRunMapper {
     private Map<Integer, Picture> lookup;
     private List<Picture> nonU1based;
     private List<Picture> all;
-    private int pn = 0;
+    private int pn;
 
     public PictureRunMapper(HWPFDocument doc) {
         picturesTable = doc.getPicturesTable();
index fb99df52f94889185ed241d2b4d3e4b02b373064..74921b15b575544674fa20173c5c03cf1106cb0b 100644 (file)
@@ -23,7 +23,7 @@ public final class Table extends Range
 {
     private ArrayList<TableRow> _rows;
 
-    private boolean _rowsFound = false;
+    private boolean _rowsFound;
 
     private int _tableLevel;
 
index a12dc63be30d45e8610ff042fbc4e202fb8da8c8..4bfac1d4adf5efb671f419fe7d586f9f8ce49775 100644 (file)
@@ -39,7 +39,7 @@ public final class TableRow extends Range
     private final static char TABLE_CELL_MARK = '\u0007';
 
     private TableCell[] _cells;
-    private boolean _cellsFound = false;
+    private boolean _cellsFound;
 
     int _levelNum;
     private SprmBuffer _papx;
index eeb55a56c540b80ea7215be1bce10f68b40aa420..1e18b9847804c697058c7d9ab78435692f8f4859 100644 (file)
@@ -26,7 +26,7 @@ import org.apache.poi.hdgf.pointers.Pointer;
 public abstract class StreamTest {
     public static class TestPointer extends Pointer {
         private final boolean compressed;
-        protected boolean hasPointers = false;
+        protected boolean hasPointers;
         public TestPointer(boolean compressed, int offset, int length, int type, short format) {
             this.compressed = compressed;
             setOffset(offset);
index 7e3bf2ec6d7f71b88aef6e77518ea5b6563f173c..97a042c764ef33b6f65cc8b44ed380e02fbb9944 100644 (file)
@@ -158,7 +158,7 @@ public class TestHwmfParsing {
         outdir.mkdirs();
         final String startFile = "";
         File files[] = indir.listFiles(new FileFilter() {
-            boolean foundStartFile = false;
+            boolean foundStartFile;
             @Override
             public boolean accept(File pathname) {
                 foundStartFile |= startFile.isEmpty() || pathname.getName().contains(startFile);
index 759e1afb0498552319a95b7f7728b024778b751b..96ca5cc64cd3336e977d9b8e8190e02e3cf3ffb9 100644 (file)
@@ -28,7 +28,7 @@ import org.apache.poi.hwpf.model.io.HWPFFileSystem;
 public final class TestCHPBinTable
   extends TestCase
 {
-  private CHPBinTable _cHPBinTable = null;
+  private CHPBinTable _cHPBinTable;
   private HWPFDocFixture _hWPFDocFixture;
 
   private final TextPieceTable fakeTPT = new TextPieceTable() {
index 9dfc57208057863eb0272e7ab1e17289334ac575..60703f280c703f9b034020ecc232cb2b9f34d5c0 100644 (file)
@@ -28,7 +28,7 @@ import org.junit.Test;
 // TODO: Add DocumentProperties#equals ???
 
 public final class TestDocumentProperties {
-    private DocumentProperties _documentProperties = null;
+    private DocumentProperties _documentProperties;
     private HWPFDocFixture _hWPFDocFixture;
 
     @Test
index e6e21458cf100d23b7a1f2f06de3c9227939dc1e..a2fa09e12f9c254f8063d5cf9eda8fc67706e131 100644 (file)
@@ -26,7 +26,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 public final class TestFileInformationBlock {
-    private FileInformationBlock _fileInformationBlock = null;
+    private FileInformationBlock _fileInformationBlock;
     private HWPFDocFixture _hWPFDocFixture;
 
     @Test
index 1b332db0700c8a2b0e19012fc30d1d6ae594f06d..860e568850077d5ba19c3c4bf5e81c8b78a72679 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 public final class TestFontTable {
-  private FontTable _fontTable = null;
+  private FontTable _fontTable;
   private HWPFDocFixture _hWPFDocFixture;
 
   @Test
index 07540541e3b0825bb6ab3ede75304885cc1fd06e..09fefc21e3ce3bdb93aae71f755b296d9daf7fae 100644 (file)
@@ -25,7 +25,7 @@ import org.apache.poi.util.LittleEndian;
 public final class TestPlexOfCps
   extends TestCase
 {
-  private PlexOfCps _plexOfCps = null;
+  private PlexOfCps _plexOfCps;
   private HWPFDocFixture _hWPFDocFixture;
 
   public void testWriteRead() {
index 2e374c299a1dbad61462e63e5d4eee2c725773bd..328e5d428b787efd764459186598b05afe6cb127 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Before;
 import org.junit.Test;
 
 public final class TestStyleSheet {
-  private StyleSheet _styleSheet = null;
+  private StyleSheet _styleSheet;
   private HWPFDocFixture _hWPFDocFixture;
 
   @Test
index 4adf939968f874a1a0a82171a8964b265119fca1..4dde3ef2399f05e5f1786bde16c033e902961fd8 100644 (file)
@@ -27,7 +27,7 @@ import org.apache.poi.hwpf.HWPFTestDataSamples;
  */
 public final class TestBorderCode extends TestCase {
 
-    private int pos = 0;
+    private int pos;
     private Range range;
 
     public void test() {
index 9912b42a174eb33dd62196c78d9fe06ac3dd69b8..0a9414c6f662a161eca93bb684c96af641c59a1d 100644 (file)
@@ -420,7 +420,7 @@ public final class TestCellStyle extends TestCase {
     
     private static class CellFormatBugExample extends Thread {
         private final String fileName;
-        private Throwable exception = null;
+        private Throwable exception;
 
         public CellFormatBugExample(String fileName) {
             this.fileName = fileName;
index 593963b14a5b3e32605e6847cd02fe9731e492bd..1533f36ed15a5378c39ce8d23806ae09f6921db4 100644 (file)
@@ -51,7 +51,7 @@ import org.junit.Test;
  *
  */
 public final class TestFormulaEvaluatorBugs {
-    private static boolean OUTPUT_TEST_FILES = false;
+    private static boolean OUTPUT_TEST_FILES;
     private static String tmpDirName;
 
     @BeforeClass
index ea995c11f4c76f5508ca618898c47eff966dbd76..400b5251206203edceedba5b0d4fc4d6f3cbde2f 100644 (file)
@@ -193,7 +193,7 @@ public final class TestRawDataBlock extends TestCase {
                private final Random rnd = new Random();
                private final byte[] data;
                private final int chunkSize;
-               private int pos = 0;
+               private int pos;
 
                public SlowInputStream(byte[] data, int chunkSize) {
                        this.chunkSize = chunkSize;
index d3adcce0c0dd09a87a793069fc381c35c32b6cb7..f9ec43425f8408d164ae37ab25e1ddd9c386f2fb 100644 (file)
@@ -54,8 +54,8 @@ public class TestCellWalk extends TestCase {
 
     private static class CountCellHandler implements CellHandler {
 
-       private int cellsVisited = 0;
-       private long ordinalNumberSum = 0L;
+       private int cellsVisited;
+       private long ordinalNumberSum;
 
        @Override
     public void onCell(Cell cell, CellWalkContext ctx) {
index 4a08a32e07c7a9c22aaa7a1d2430b3ae0b1a3f61..2156040b31478f58535e4048f167a4dd3807b94b 100644 (file)
@@ -42,7 +42,7 @@ import org.junit.Test;
  */
 public final class TestIOUtils {
 
-    static File TMP = null;
+    static File TMP;
     static final long LENGTH = new Random().nextInt(10000);
 
     @BeforeClass
@@ -176,8 +176,8 @@ public final class TestIOUtils {
      * as requested.  This tests that the fallback to read() works.
      */
     private static class WonkyInputStream extends InputStream {
-        int skipCalled = 0;
-        int readCalled = 0;
+        int skipCalled;
+        int readCalled;
 
         @Override
         public int read() throws IOException {
index 6650ed9e6605aefbdc401b9b1440b4f7568dff6a..7a286001739ae8c1088fbe99c37ef0f98655f8ad 100644 (file)
@@ -29,7 +29,7 @@ import org.junit.Test;
  */
 public final class TestPOILogger extends POILogger {
     private String lastLog = "";
-    private Throwable lastEx = null;
+    private Throwable lastEx;
     
     /**
      * Test different types of log output.