You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@poi.apache.org by ki...@apache.org on 2014/02/14 00:34:12 UTC

svn commit: r1568145 - in /poi/trunk: ./ src/java/org/apache/poi/hpsf/ src/java/org/apache/poi/hssf/record/ src/ooxml/java/org/apache/poi/extractor/ src/ooxml/java/org/apache/poi/xslf/usermodel/ src/ooxml/java/org/apache/poi/xssf/usermodel/ src/ooxml/j...

Author: kiwiwings
Date: Thu Feb 13 23:34:11 2014
New Revision: 1568145

URL: http://svn.apache.org/r1568145
Log:
FindBugs fix
- fixed "Field isn't final but should be"
- see http://findbugs.sourceforge.net/bugDescriptions.html#MS_SHOULD_BE_FINAL

Modified:
    poi/trunk/build.xml
    poi/trunk/src/java/org/apache/poi/hpsf/Thumbnail.java
    poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java
    poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/FtPioGrbitSubRecord.java
    poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java
    poi/trunk/src/ooxml/java/org/apache/poi/extractor/CommandLineTextExtractor.java
    poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java
    poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java
    poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java
    poi/trunk/src/resources/devtools/findbugs-filters.xml
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/PPTXMLDump.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/AutoShapes.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeFactory.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapePainter.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeTypes.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/CharFlagsTextProp.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/ParagraphFlagsTextProp.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/PictureData.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java

Modified: poi/trunk/build.xml
URL: http://svn.apache.org/viewvc/poi/trunk/build.xml?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/build.xml (original)
+++ poi/trunk/build.xml Thu Feb 13 23:34:11 2014
@@ -1405,7 +1405,7 @@ under the License.
 			</classpath>
 		</taskdef>
 		<findbugs home="${findbugs.home}" output="html" outputFile="build/findbugs.html"
-			includeFilter="src/resources/devtools/findbugs-filters.xml">
+			excludeFilter="src/resources/devtools/findbugs-filters.xml">
 			<fileset dir="${dist.dir}">
 				<include name="poi-${version.id}-*.jar"/>
 				<include name="poi-scratchpad-${version.id}-*.jar"/>

Modified: poi/trunk/src/java/org/apache/poi/hpsf/Thumbnail.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/Thumbnail.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/Thumbnail.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/Thumbnail.java Thu Feb 13 23:34:11 2014
@@ -32,7 +32,7 @@ public final class Thumbnail {
      * <code>byte[]</code> returned by {@link
      * SummaryInformation#getThumbnail()}</p>
      */
-    public static int OFFSET_CFTAG = 4;
+    public static final int OFFSET_CFTAG = 4;
 
     /**
      * <p>Offset in bytes where the Clipboard Format starts in the
@@ -42,7 +42,7 @@ public final class Thumbnail {
      * <p>This is only valid if the Clipboard Format Tag is {@link
      * #CFTAG_WINDOWS}</p>
      */
-    public static int OFFSET_CF = 8;
+    public static final int OFFSET_CF = 8;
 
     /**
      * <p>Offset in bytes where the Windows Metafile (WMF) image data
@@ -60,7 +60,7 @@ public final class Thumbnail {
      * image. It can be saved to disk with a <code>.wmf</code> file
      * type and read using a WMF-capable image viewer.</p>
      */
-    public static int OFFSET_WMFDATA = 20;
+    public static final int OFFSET_WMFDATA = 20;
 
     /**
      * <p>Clipboard Format Tag - Windows clipboard format</p>
@@ -68,7 +68,7 @@ public final class Thumbnail {
      * <p>A <code>DWORD</code> indicating a built-in Windows clipboard
      * format value</p>
      */
-    public static int CFTAG_WINDOWS = -1;
+    public static final int CFTAG_WINDOWS = -1;
 
     /**
      * <p>Clipboard Format Tag - Macintosh clipboard format</p>
@@ -76,7 +76,7 @@ public final class Thumbnail {
      * <p>A <code>DWORD</code> indicating a Macintosh clipboard format
      * value</p>
      */
-    public static int CFTAG_MACINTOSH = -2;
+    public static final int CFTAG_MACINTOSH = -2;
 
     /**
      * <p>Clipboard Format Tag - Format ID</p>
@@ -84,7 +84,7 @@ public final class Thumbnail {
      * <p>A GUID containing a format identifier (FMTID). This is
      * rarely used.</p>
      */
-    public static int CFTAG_FMTID = -3;
+    public static final int CFTAG_FMTID = -3;
 
     /**
      * <p>Clipboard Format Tag - No Data</p>
@@ -92,7 +92,7 @@ public final class Thumbnail {
      * <p>A <code>DWORD</code> indicating No data. This is rarely
      * used.</p>
      */
-    public static int CFTAG_NODATA = 0;
+    public static final int CFTAG_NODATA = 0;
 
     /**
      * <p>Clipboard Format - Windows metafile format. This is the
@@ -102,17 +102,17 @@ public final class Thumbnail {
      * regular WMF images. The clipboard version of this format has an
      * extra clipboard-specific header.</p>
      */
-    public static int CF_METAFILEPICT = 3;
+    public static final int CF_METAFILEPICT = 3;
 
     /**
      * <p>Clipboard Format - Device Independent Bitmap</p>
      */
-    public static int CF_DIB = 8;
+    public static final int CF_DIB = 8;
 
     /**
      * <p>Clipboard Format - Enhanced Windows metafile format</p>
      */
-    public static int CF_ENHMETAFILE = 14;
+    public static final int CF_ENHMETAFILE = 14;
 
     /**
      * <p>Clipboard Format - Bitmap</p>
@@ -121,7 +121,7 @@ public final class Thumbnail {
      * href="msdn.microsoft.com/library/en-us/dnw98bk/html/clipboardoperations.asp
      * target="_blank">msdn.microsoft.com/library/en-us/dnw98bk/html/clipboardoperations.asp</a>.</p>
      */
-    public static int CF_BITMAP = 2;
+    public static final int CF_BITMAP = 2;
 
     /**
      * <p>A <code>byte[]</code> to hold a thumbnail image in ({@link

Modified: poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java (original)
+++ poi/trunk/src/java/org/apache/poi/hpsf/VariantSupport.java Thu Feb 13 23:34:11 2014
@@ -49,7 +49,7 @@ import org.apache.poi.util.POILogger;
  */
 public class VariantSupport extends Variant
 {
-	private static POILogger logger = POILogFactory.getLogger(VariantSupport.class);
+	private static final POILogger logger = POILogFactory.getLogger(VariantSupport.class);
     private static boolean logUnsupportedTypes = false;
 
     /**

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/FtCfSubRecord.java Thu Feb 13 23:34:11 2014
@@ -32,18 +32,18 @@ public final class FtCfSubRecord extends
     /**
      * Specifies the format of the picture is an enhanced metafile.
      */
-    public static short METAFILE_BIT    = (short)0x0002;
+    public static final short METAFILE_BIT    = (short)0x0002;
 
     /**
      * Specifies the format of the picture is a bitmap.
      */
-    public static short BITMAP_BIT      = (short)0x0009;
+    public static final short BITMAP_BIT      = (short)0x0009;
     
     /**
      * Specifies the picture is in an unspecified format that is
      * neither and enhanced metafile nor a bitmap.
      */
-    public static short UNSPECIFIED_BIT = (short)0xFFFF;
+    public static final short UNSPECIFIED_BIT = (short)0xFFFF;
     
     private short flags = 0;
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/FtPioGrbitSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/FtPioGrbitSubRecord.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/FtPioGrbitSubRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/FtPioGrbitSubRecord.java Thu Feb 13 23:34:11 2014
@@ -33,53 +33,53 @@ public final class FtPioGrbitSubRecord e
      * A bit that specifies whether the picture's aspect ratio is preserved when rendered in 
      * different views (Normal view, Page Break Preview view, Page Layout view and printing).
      */
-    public static int AUTO_PICT_BIT    = 1 << 0;
+    public static final int AUTO_PICT_BIT    = 1 << 0;
 
     /**
      * A bit that specifies whether the pictFmla field of the Obj record that contains 
      * this FtPioGrbit specifies a DDE reference.
      */
-    public static int DDE_BIT          = 1 << 1;
+    public static final int DDE_BIT          = 1 << 1;
     
     /**
      * A bit that specifies whether this object is expected to be updated on print to
      * reflect the values in the cell associated with the object.
      */
-    public static int PRINT_CALC_BIT   = 1 << 2;
+    public static final int PRINT_CALC_BIT   = 1 << 2;
 
     /**
      * A bit that specifies whether the picture is displayed as an icon.
      */
-    public static int ICON_BIT         = 1 << 3;
+    public static final int ICON_BIT         = 1 << 3;
     
     /**
      * A bit that specifies whether this object is an ActiveX control.
      * It MUST NOT be the case that both fCtl and fDde are equal to 1.
      */
-    public static int CTL_BIT          = 1 << 4;
+    public static final int CTL_BIT          = 1 << 4;
     
     /**
      * A bit that specifies whether the object data are stored in an
      * embedding storage (= 0) or in the controls stream (ctls) (= 1).
      */
-    public static int PRSTM_BIT        = 1 << 5;
+    public static final int PRSTM_BIT        = 1 << 5;
     
     /**
      * A bit that specifies whether this is a camera picture.
      */
-    public static int CAMERA_BIT       = 1 << 7;
+    public static final int CAMERA_BIT       = 1 << 7;
     
     /**
      * A bit that specifies whether this picture's size has been explicitly set.
      * 0 = picture size has been explicitly set, 1 = has not been set
      */
-    public static int DEFAULT_SIZE_BIT = 1 << 8;
+    public static final int DEFAULT_SIZE_BIT = 1 << 8;
     
     /**
      * A bit that specifies whether the OLE server for the object is called
      * to load the object's data automatically when the parent workbook is opened.
      */
-    public static int AUTO_LOAD_BIT    = 1 << 9;
+    public static final int AUTO_LOAD_BIT    = 1 << 9;
 
     
     private short flags = 0;

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/LbsDataSubRecord.java Thu Feb 13 23:34:11 2014
@@ -16,8 +16,11 @@
 ==================================================================== */
 package org.apache.poi.hssf.record;
 
-import org.apache.poi.ss.formula.ptg.*;
-import org.apache.poi.util.*;
+import org.apache.poi.ss.formula.ptg.Ptg;
+import org.apache.poi.util.HexDump;
+import org.apache.poi.util.LittleEndianInput;
+import org.apache.poi.util.LittleEndianOutput;
+import org.apache.poi.util.StringUtil;
 
 /**
  * This structure specifies the properties of a list or drop-down list embedded object in a sheet.
@@ -298,15 +301,15 @@ public class LbsDataSubRecord extends Su
         /**
          * Combo dropdown control
          */
-        public static int STYLE_COMBO_DROPDOWN = 0;
+        public static final int STYLE_COMBO_DROPDOWN = 0;
         /**
          * Combo Edit dropdown control
          */
-        public static int STYLE_COMBO_EDIT_DROPDOWN = 1;
+        public static final int STYLE_COMBO_EDIT_DROPDOWN = 1;
         /**
          * Simple dropdown control (just the dropdown button)
          */
-        public static int STYLE_COMBO_SIMPLE_DROPDOWN = 2;
+        public static final int STYLE_COMBO_SIMPLE_DROPDOWN = 2;
 
         /**
          *  An unsigned integer that specifies the style of this dropdown. 

Modified: poi/trunk/src/ooxml/java/org/apache/poi/extractor/CommandLineTextExtractor.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/extractor/CommandLineTextExtractor.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/extractor/CommandLineTextExtractor.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/extractor/CommandLineTextExtractor.java Thu Feb 13 23:34:11 2014
@@ -25,7 +25,7 @@ import org.apache.poi.POITextExtractor;
  *  for when debugging.
  */
 public class CommandLineTextExtractor {
-   public static String DIVIDER = "=======================";
+   public static final String DIVIDER = "=======================";
    
    public static void main(String[] args) throws Exception {
       if(args.length < 1) {

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xslf/usermodel/XSLFRelation.java Thu Feb 13 23:34:11 2014
@@ -16,24 +16,24 @@
 ==================================================================== */
 package org.apache.poi.xslf.usermodel;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.poi.POIXMLDocumentPart;
 import org.apache.poi.POIXMLRelation;
 import org.apache.poi.util.Beta;
 import org.apache.poi.util.POILogFactory;
 import org.apache.poi.util.POILogger;
 
-import java.util.HashMap;
-import java.util.Map;
-
 @Beta
 public class XSLFRelation extends POIXMLRelation {
 
-   private static POILogger log = POILogFactory.getLogger(XSLFRelation.class);
+   private static final POILogger log = POILogFactory.getLogger(XSLFRelation.class);
 
    /**
     * A map to lookup POIXMLRelation by its relation type
     */
-   protected static Map<String, XSLFRelation> _table = new HashMap<String, XSLFRelation>();
+   protected static final Map<String, XSLFRelation> _table = new HashMap<String, XSLFRelation>();
    
    public static final XSLFRelation MAIN = new XSLFRelation(
            "application/vnd.openxmlformats-officedocument.presentationml.presentation.main+xml",

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFRelation.java Thu Feb 13 23:34:11 2014
@@ -47,12 +47,12 @@ import org.apache.poi.xssf.model.ThemesT
  */
 public final class XSSFRelation extends POIXMLRelation {
 
-    private static POILogger log = POILogFactory.getLogger(XSSFRelation.class);
+    private static final POILogger log = POILogFactory.getLogger(XSSFRelation.class);
 
     /**
      * A map to lookup POIXMLRelation by its relation type
      */
-    protected static Map<String, XSSFRelation> _table = new HashMap<String, XSSFRelation>();
+    protected static final Map<String, XSSFRelation> _table = new HashMap<String, XSSFRelation>();
 
 
     public static final XSSFRelation WORKBOOK = new XSSFRelation(

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/XWPFRelation.java Thu Feb 13 23:34:11 2014
@@ -31,7 +31,7 @@ public final class XWPFRelation extends 
     /**
      * A map to lookup POIXMLRelation by its relation type
      */
-    protected static Map<String, XWPFRelation> _table = new HashMap<String, XWPFRelation>();
+    protected static final Map<String, XWPFRelation> _table = new HashMap<String, XWPFRelation>();
 
 
     public static final XWPFRelation DOCUMENT = new XWPFRelation(

Modified: poi/trunk/src/resources/devtools/findbugs-filters.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/resources/devtools/findbugs-filters.xml?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/resources/devtools/findbugs-filters.xml (original)
+++ poi/trunk/src/resources/devtools/findbugs-filters.xml Thu Feb 13 23:34:11 2014
@@ -18,7 +18,7 @@
    ====================================================================
 -->
 <FindBugsFilter>
-<Match>
-<Not><Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE"/></Not>
-</Match>
+	<Match>
+		<Bug pattern="CN_IMPLEMENTS_CLONE_BUT_NOT_CLONEABLE,MS_PKGPROTECT,MS_MUTABLE_ARRAY"/>
+	</Match>
 </FindBugsFilter>
\ No newline at end of file

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/PPTXMLDump.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/PPTXMLDump.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/PPTXMLDump.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/PPTXMLDump.java Thu Feb 13 23:34:11 2014
@@ -17,10 +17,19 @@
 
 package org.apache.poi.hslf.dev;
 
-import org.apache.poi.util.LittleEndian;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+
 import org.apache.poi.hslf.record.RecordTypes;
-import org.apache.poi.poifs.filesystem.*;
-import java.io.*;
+import org.apache.poi.poifs.filesystem.DocumentEntry;
+import org.apache.poi.poifs.filesystem.DocumentInputStream;
+import org.apache.poi.poifs.filesystem.POIFSFileSystem;
+import org.apache.poi.util.LittleEndian;
 
 /**
  * Utility class which dumps raw contents of a ppt file into XML format
@@ -33,7 +42,7 @@ public final class PPTXMLDump {
     public static final int PICT_HEADER_SIZE = 25; //size of the picture header
     public final static String PPDOC_ENTRY = "PowerPoint Document";
     public final static String PICTURES_ENTRY = "Pictures";
-    public static String CR = System.getProperty("line.separator");
+    public final static String CR = System.getProperty("line.separator");
 
     protected Writer out;
     protected byte[] docstream;

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/AutoShapes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/AutoShapes.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/AutoShapes.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/AutoShapes.java Thu Feb 13 23:34:11 2014
@@ -17,9 +17,15 @@
 
 package org.apache.poi.hslf.model;
 
-import org.apache.poi.ddf.EscherProperties;
+import java.awt.geom.AffineTransform;
+import java.awt.geom.Arc2D;
+import java.awt.geom.Ellipse2D;
+import java.awt.geom.GeneralPath;
+import java.awt.geom.Line2D;
+import java.awt.geom.Rectangle2D;
+import java.awt.geom.RoundRectangle2D;
 
-import java.awt.geom.*;
+import org.apache.poi.ddf.EscherProperties;
 
 /**
  * Stores definition of auto-shapes.
@@ -30,7 +36,7 @@ import java.awt.geom.*;
  * @author Yegor Kozlov
  */
 public final class AutoShapes {
-    protected static ShapeOutline[] shapes;
+	protected static final ShapeOutline[] shapes;
 
 
     /**

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeFactory.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeFactory.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeFactory.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeFactory.java Thu Feb 13 23:34:11 2014
@@ -17,13 +17,25 @@
 
 package org.apache.poi.hslf.model;
 
-import org.apache.poi.ddf.*;
-import org.apache.poi.util.POILogger;
-import org.apache.poi.util.POILogFactory;
-import org.apache.poi.hslf.record.*;
-
-import java.util.List;
 import java.util.Iterator;
+import java.util.List;
+
+import org.apache.poi.ddf.EscherClientDataRecord;
+import org.apache.poi.ddf.EscherContainerRecord;
+import org.apache.poi.ddf.EscherOptRecord;
+import org.apache.poi.ddf.EscherProperties;
+import org.apache.poi.ddf.EscherProperty;
+import org.apache.poi.ddf.EscherPropertyFactory;
+import org.apache.poi.ddf.EscherRecord;
+import org.apache.poi.ddf.EscherSimpleProperty;
+import org.apache.poi.ddf.EscherSpRecord;
+import org.apache.poi.hslf.record.InteractiveInfo;
+import org.apache.poi.hslf.record.InteractiveInfoAtom;
+import org.apache.poi.hslf.record.OEShapeAtom;
+import org.apache.poi.hslf.record.Record;
+import org.apache.poi.hslf.record.RecordTypes;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * Create a <code>Shape</code> object depending on its type
@@ -32,7 +44,7 @@ import java.util.Iterator;
  */
 public final class ShapeFactory {
     // For logging
-    protected static POILogger logger = POILogFactory.getLogger(ShapeFactory.class);
+    protected static final POILogger logger = POILogFactory.getLogger(ShapeFactory.class);
 
     /**
      * Create a new shape from the data provided.

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapePainter.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapePainter.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapePainter.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapePainter.java Thu Feb 13 23:34:11 2014
@@ -18,19 +18,22 @@
 package org.apache.poi.hslf.model;
 
 
-import org.apache.poi.util.POILogger;
-import org.apache.poi.util.POILogFactory;
-
-import java.awt.*;
+import java.awt.BasicStroke;
+import java.awt.Color;
+import java.awt.Graphics2D;
+import java.awt.Stroke;
 import java.awt.geom.Rectangle2D;
 
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
+
 /**
  * Paint a shape into java.awt.Graphics2D
  *
  * @author Yegor Kozlov
  */
 public final class ShapePainter {
-    protected static POILogger logger = POILogFactory.getLogger(ShapePainter.class);
+    protected static final POILogger logger = POILogFactory.getLogger(ShapePainter.class);
 
     public static void paint(SimpleShape shape, Graphics2D graphics){
         Rectangle2D anchor = shape.getLogicalAnchor2D();

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeTypes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeTypes.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeTypes.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/ShapeTypes.java Thu Feb 13 23:34:11 2014
@@ -17,10 +17,10 @@
 
 package org.apache.poi.hslf.model;
 
-import org.apache.poi.hslf.exceptions.HSLFException;
-
-import java.util.HashMap;
 import java.lang.reflect.Field;
+import java.util.HashMap;
+
+import org.apache.poi.hslf.exceptions.HSLFException;
 
 /**
  * Contains all known shape types in PowerPoint
@@ -38,7 +38,7 @@ public final class ShapeTypes implements
         return name;
     }
 
-    public static HashMap types;
+    public static final HashMap types;
     static {
         types = new HashMap();
         try {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/CharFlagsTextProp.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/CharFlagsTextProp.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/CharFlagsTextProp.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/CharFlagsTextProp.java Thu Feb 13 23:34:11 2014
@@ -32,7 +32,7 @@ public class CharFlagsTextProp extends B
 	public static final int ENABLE_NUMBERING_1_IDX = 11;
 	public static final int ENABLE_NUMBERING_2_IDX = 12;
 
-    public static String NAME = "char_flags";
+    public static final String NAME = "char_flags";
 	public CharFlagsTextProp() {
 		super(2,0xffff, NAME, new String[] {
 				"bold",                 // 0x0001  A bit that specifies whether the characters are bold.

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/ParagraphFlagsTextProp.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/ParagraphFlagsTextProp.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/ParagraphFlagsTextProp.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/ParagraphFlagsTextProp.java Thu Feb 13 23:34:11 2014
@@ -28,7 +28,7 @@ public final class ParagraphFlagsTextPro
 	public static final int BULLET_HARDCOLOR_IDX = 2;
 	public static final int BULLET_HARDSIZE_IDX = 4;
 
-    public static String NAME = "paragraph_flags";
+    public static final String NAME = "paragraph_flags";
 
 	public ParagraphFlagsTextProp() {
 		super(2,  0xF, NAME, new String[] {

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/Record.java Thu Feb 13 23:34:11 2014
@@ -38,7 +38,7 @@ import org.apache.poi.util.POILogger;
 public abstract class Record
 {
     // For logging
-	protected static POILogger logger = POILogFactory.getLogger(Record.class);
+	protected static final POILogger logger = POILogFactory.getLogger(Record.class);
 
 	/**
 	 * Is this record type an Atom record (only has data),

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/RecordTypes.java Thu Feb 13 23:34:11 2014
@@ -17,8 +17,8 @@
 
 package org.apache.poi.hslf.record;
 
-import java.util.HashMap;
 import java.lang.reflect.Field;
+import java.util.HashMap;
 
 /**
  * List of all known record types in a PowerPoint document, and the
@@ -31,8 +31,8 @@ import java.lang.reflect.Field;
  * @author Nick Burch
  */
 public final class RecordTypes {
-    public static HashMap<Integer,String> typeToName;
-    public static HashMap<Integer,Class<? extends Record>> typeToClass;
+    public static final HashMap<Integer,String> typeToName;
+    public static final HashMap<Integer,Class<? extends Record>> typeToClass;
 
     public static final Type Unknown = new Type(0,null);
     public static final Type Document = new Type(1000,Document.class);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/SSSlideInfoAtom.java Thu Feb 13 23:34:11 2014
@@ -64,42 +64,42 @@ public class SSSlideInfoAtom extends Rec
      * A bit that specifies whether the presentation slide can be
      * manually advanced by the user during the slide show.
      */
-    public static int MANUAL_ADVANCE_BIT     = 1 << 0;
+    public static final int MANUAL_ADVANCE_BIT     = 1 << 0;
     
     /**
      * A bit that specifies whether the corresponding slide is 
      * hidden and is not displayed during the slide show.
      */
-    public static int HIDDEN_BIT             = 1 << 2;
+    public static final int HIDDEN_BIT             = 1 << 2;
     
     /**
      * A bit that specifies whether to play the sound specified by soundIfRef.
      */
-    public static int SOUND_BIT              = 1 << 4;
+    public static final int SOUND_BIT              = 1 << 4;
     
     /**
      * A bit that specifies whether the sound specified by soundIdRef is
      * looped continuously when playing until the next sound plays.
      */
-    public static int LOOP_SOUND_BIT         = 1 << 6;
+    public static final int LOOP_SOUND_BIT         = 1 << 6;
     
     /**
      * A bit that specifies whether to stop any currently playing 
      * sound when the transition starts.
      */
-    public static int STOP_SOUND_BIT         = 1 << 8;
+    public static final int STOP_SOUND_BIT         = 1 << 8;
     
     /**
      * A bit that specifies whether the slide will automatically
      * advance after slideTime milliseconds during the slide show.
      */
-    public static int AUTO_ADVANCE_BIT       = 1 << 10;
+    public static final int AUTO_ADVANCE_BIT       = 1 << 10;
 
     /**
      * A bit that specifies whether to display the cursor during
      * the slide show. 
      */
-    public static int CURSOR_VISIBLE_BIT     = 1 << 12;
+    public static final int CURSOR_VISIBLE_BIT     = 1 << 12;
     
     // public static int RESERVED1_BIT       = 1 << 1;
     // public static int RESERVED2_BIT       = 1 << 3;
@@ -109,7 +109,7 @@ public class SSSlideInfoAtom extends Rec
     // public static int RESERVED6_BIT       = 1 << 11;
     // public static int RESERVED7_BIT       = 1 << 13 | 1 << 14 | 1 << 15;
     
-    private static long _type = RecordTypes.SSSlideInfoAtom.typeID;
+    private static final long _type = RecordTypes.SSSlideInfoAtom.typeID;
 
     private byte[] _header;
 

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/record/StyleTextPropAtom.java Thu Feb 13 23:34:11 2014
@@ -118,7 +118,7 @@ public final class StyleTextPropAtom ext
     }
 
     /** All the different kinds of paragraph properties we might handle */
-    public static TextProp[] paragraphTextPropTypes = new TextProp[] {
+    public static final TextProp[] paragraphTextPropTypes = new TextProp[] {
         new TextProp(0, 0x1, "hasBullet"),
         new TextProp(0, 0x2, "hasBulletFont"),
         new TextProp(0, 0x4, "hasBulletColor"),
@@ -141,7 +141,7 @@ public final class StyleTextPropAtom ext
         new TextProp(2, 0x200000, "textDirection")
     };
     /** All the different kinds of character properties we might handle */
-    public static TextProp[] characterTextPropTypes = new TextProp[] {
+    public static final TextProp[] characterTextPropTypes = new TextProp[] {
         new TextProp(0, 0x1, "bold"),
         new TextProp(0, 0x2, "italic"),
         new TextProp(0, 0x4, "underline"),

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/PictureData.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/PictureData.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/PictureData.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/usermodel/PictureData.java Thu Feb 13 23:34:11 2014
@@ -17,18 +17,25 @@
 
 package org.apache.poi.hslf.usermodel;
 
-import org.apache.poi.util.LittleEndian;
-import org.apache.poi.util.POILogger;
-import org.apache.poi.util.POILogFactory;
-import org.apache.poi.hslf.model.Picture;
-import org.apache.poi.hslf.blip.*;
-import org.apache.poi.hslf.exceptions.HSLFException;
-
-import java.io.OutputStream;
+import java.awt.Graphics2D;
 import java.io.IOException;
+import java.io.OutputStream;
 import java.security.MessageDigest;
 import java.security.NoSuchAlgorithmException;
-import java.awt.*;
+
+import org.apache.poi.hslf.blip.BitmapPainter;
+import org.apache.poi.hslf.blip.DIB;
+import org.apache.poi.hslf.blip.EMF;
+import org.apache.poi.hslf.blip.ImagePainter;
+import org.apache.poi.hslf.blip.JPEG;
+import org.apache.poi.hslf.blip.PICT;
+import org.apache.poi.hslf.blip.PNG;
+import org.apache.poi.hslf.blip.WMF;
+import org.apache.poi.hslf.exceptions.HSLFException;
+import org.apache.poi.hslf.model.Picture;
+import org.apache.poi.util.LittleEndian;
+import org.apache.poi.util.POILogFactory;
+import org.apache.poi.util.POILogger;
 
 /**
  * A class that represents image data contained in a slide show.
@@ -77,7 +84,7 @@ public abstract class PictureData {
      */
     protected abstract int getSignature();
 
-    protected static ImagePainter[] painters = new ImagePainter[8];
+    protected static final ImagePainter[] painters = new ImagePainter[8];
     static {
         PictureData.setImagePainter(Picture.PNG, new BitmapPainter());
         PictureData.setImagePainter(Picture.JPEG, new BitmapPainter());

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java?rev=1568145&r1=1568144&r2=1568145&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java (original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hwpf/model/PropertyNode.java Thu Feb 13 23:34:11 2014
@@ -40,7 +40,7 @@ public abstract class PropertyNode<T ext
     public static final class EndComparator implements
             Comparator<PropertyNode<?>>
     {
-        public static EndComparator instance = new EndComparator();
+        public static final EndComparator instance = new EndComparator();
 
         public int compare( PropertyNode<?> o1, PropertyNode<?> o2 )
         {
@@ -54,7 +54,7 @@ public abstract class PropertyNode<T ext
     public static final class StartComparator implements
             Comparator<PropertyNode<?>>
     {
-        public static StartComparator instance = new StartComparator();
+        public static final StartComparator instance = new StartComparator();
 
         public int compare( PropertyNode<?> o1, PropertyNode<?> o2 )
         {



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@poi.apache.org
For additional commands, e-mail: commits-help@poi.apache.org