]> source.dussan.org Git - poi.git/commitdiff
findbugs - DM_NUMBER_CTOR
authorAndreas Beeker <kiwiwings@apache.org>
Thu, 13 Aug 2015 00:38:04 +0000 (00:38 +0000)
committerAndreas Beeker <kiwiwings@apache.org>
Thu, 13 Aug 2015 00:38:04 +0000 (00:38 +0000)
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1695635 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java
src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java
src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java
src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java

index 7f6e4022d76e5b00fdd5efad155233476fd821e4..f2ccc71e4545cac9160dafc6fff72bc7d098d500 100644 (file)
@@ -178,7 +178,7 @@ public final class SharedValueManager {
 
     private Integer getKeyForCache(final CellReference cellRef) {
         // The HSSF has a max of 2^16 rows and 2^8 cols
-        return new Integer((cellRef.getCol()+1)<<16 | cellRef.getRow());
+        return ((cellRef.getCol()+1)<<16 | cellRef.getRow());
     }
 
        /**
index 283b829c2adfee994333d69bb90a58df736aa96f..0094976530762d0af853f09c802190e47296eb1a 100644 (file)
@@ -135,7 +135,7 @@ public class SXSSFSheet implements Sheet, Cloneable
         if(initialAllocationSize<=0)
             initialAllocationSize=10;
         SXSSFRow newRow=new SXSSFRow(this,initialAllocationSize);
-        _rows.put(new Integer(rownum),newRow);
+        _rows.put(rownum,newRow);
         allFlushed = false;
         if(_randomAccessWindowSize>=0&&_rows.size()>_randomAccessWindowSize)
         {
@@ -182,7 +182,7 @@ public class SXSSFSheet implements Sheet, Cloneable
      */
     public SXSSFRow getRow(int rownum)
     {
-        return _rows.get(new Integer(rownum));
+        return _rows.get(rownum);
     }
 
     /**
@@ -1165,7 +1165,7 @@ public class SXSSFSheet implements Sheet, Cloneable
      */
     public void setRowOutlineLevel(int rownum, int level)
     {
-        SXSSFRow row = _rows.get(new Integer(rownum));
+        SXSSFRow row = _rows.get(rownum);
         row.setOutlineLevel(level);
         if(level > 0 && level > outlineLevelRow) {
             outlineLevelRow = level;
@@ -1513,7 +1513,7 @@ public class SXSSFSheet implements Sheet, Cloneable
     {
         
         removeRow(row);
-        _rows.put(new Integer(newRowNum),row);
+        _rows.put(newRowNum,row);
     }
 
     public int getRowNum(SXSSFRow row)
index 4fbef1d20fd5a947acc325dc22d590ddf9107389..e44bb3b0f41cfd4554dd72e561b63075427e855c 100644 (file)
@@ -87,7 +87,7 @@ public enum BreakClear {
 \r
     static {\r
         for (BreakClear p : values()) {\r
-            imap.put(new Integer(p.getValue()), p);\r
+            imap.put(p.getValue(), p);\r
         }\r
     }\r
 \r
@@ -98,7 +98,7 @@ public enum BreakClear {
     }\r
 \r
     public static BreakClear valueOf(int type) {\r
-        BreakClear bType = imap.get(new Integer(type));\r
+        BreakClear bType = imap.get(type);\r
         if (bType == null)\r
             throw new IllegalArgumentException("Unknown break clear type: "\r
                     + type);\r
index 94cddab502f296971ae4408a6ed5ab7350ed6b74..30fc939cb00fadd1da2609b17c2031ec37410317 100644 (file)
@@ -60,7 +60,7 @@ public enum BreakType {
 \r
     static {\r
         for (BreakType p : values()) {\r
-            imap.put(new Integer(p.getValue()), p);\r
+            imap.put(p.getValue(), p);\r
         }\r
     }\r
 \r
@@ -71,7 +71,7 @@ public enum BreakType {
     }\r
 \r
     public static BreakType valueOf(int type) {\r
-        BreakType bType = imap.get(new Integer(type));\r
+        BreakType bType = imap.get(type);\r
         if (bType == null)\r
             throw new IllegalArgumentException("Unknown break type: "\r
                     + type);\r
index b46c53206cfde5e86abb41cedced4d70f412a7b1..b52d2c34f93d1e7d2da83001ca8e3719a83c901a 100644 (file)
@@ -53,7 +53,7 @@ public enum LineSpacingRule {
 \r
     static {\r
         for (LineSpacingRule p : values()) {\r
-            imap.put(new Integer(p.getValue()), p);\r
+            imap.put(p.getValue(), p);\r
         }\r
     }\r
 \r
@@ -64,7 +64,7 @@ public enum LineSpacingRule {
     }\r
 \r
     public static LineSpacingRule valueOf(int type) {\r
-        LineSpacingRule lineType = imap.get(new Integer(type));\r
+        LineSpacingRule lineType = imap.get(type);\r
         if (lineType == null)\r
             throw new IllegalArgumentException("Unknown line type: " + type);\r
         return lineType;\r
index 226d4095aee2540951ba24160ce08ff3f892b109..7cffb30a582e3de01223fbc43fd915f796af8d0c 100644 (file)
@@ -44,7 +44,7 @@ public enum ParagraphAlignment {
 \r
     static {\r
         for (ParagraphAlignment p : values()) {\r
-            imap.put(new Integer(p.getValue()), p);\r
+            imap.put(p.getValue(), p);\r
         }\r
     }\r
 \r
@@ -55,7 +55,7 @@ public enum ParagraphAlignment {
     }\r
 \r
     public static ParagraphAlignment valueOf(int type) {\r
-        ParagraphAlignment err = imap.get(new Integer(type));\r
+        ParagraphAlignment err = imap.get(type);\r
         if (err == null) throw new IllegalArgumentException("Unknown paragraph alignment: " + type);\r
         return err;\r
     }\r
index 7c1187df609f3b0a0fc5bd1d51247d0786087b2a..1cc6434c91f0cde8daf4ee7d52af30017829c578 100644 (file)
@@ -56,7 +56,7 @@ public enum TextAlignment {
 \r
     static {\r
         for (TextAlignment p : values()) {\r
-            imap.put(new Integer(p.getValue()), p);\r
+            imap.put(p.getValue(), p);\r
         }\r
     }\r
 \r
@@ -67,7 +67,7 @@ public enum TextAlignment {
     }\r
 \r
     public static TextAlignment valueOf(int type) {\r
-        TextAlignment align = imap.get(new Integer(type));\r
+        TextAlignment align = imap.get(type);\r
         if (align == null) throw new IllegalArgumentException("Unknown text alignment: " + type);\r
         return align;\r
     }\r
index 9272ac0600e1fb3b491301841093cd7e72ddbe7a..c99b17bd7abb4392b31cd54ba7209cad380195ee 100644 (file)
@@ -139,7 +139,7 @@ public enum UnderlinePatterns {
 \r
     static {\r
         for (UnderlinePatterns p : values()) {\r
-            imap.put(new Integer(p.getValue()), p);\r
+            imap.put(p.getValue(), p);\r
         }\r
     }\r
 \r
@@ -150,7 +150,7 @@ public enum UnderlinePatterns {
     }\r
 \r
     public static UnderlinePatterns valueOf(int type) {\r
-        UnderlinePatterns align = imap.get(new Integer(type));\r
+        UnderlinePatterns align = imap.get(type);\r
         if (align == null)\r
             throw new IllegalArgumentException("Unknown underline pattern: "\r
                     + type);\r
index 4114c11009222f073d0cce44ae0c23cf19bc8fc4..7b7538d192565f169d6b751a3ac716fb1400de2a 100644 (file)
@@ -51,7 +51,7 @@ public enum VerticalAlign {
 \r
     static {\r
         for (VerticalAlign p : values()) {\r
-            imap.put(new Integer(p.getValue()), p);\r
+            imap.put(p.getValue(), p);\r
         }\r
     }\r
 \r
@@ -62,7 +62,7 @@ public enum VerticalAlign {
     }\r
 \r
     public static VerticalAlign valueOf(int type) {\r
-        VerticalAlign align = imap.get(new Integer(type));\r
+        VerticalAlign align = imap.get(type);\r
         if (align == null)\r
             throw new IllegalArgumentException("Unknown vertical alignment: "\r
                     + type);\r
index 271b2591f99f8bd6b81c39847ac86d86a3d0e7f4..262a845f5127a12ac3392ffd1a87c1cb71a351ad 100644 (file)
@@ -44,7 +44,7 @@ public class TextPFException9 {
        private final AutoNumberingScheme autoNumberScheme;
        private final static AutoNumberingScheme DEFAULT_AUTONUMBER_SHEME = AutoNumberingScheme.arabicPeriod;
        private final Short autoNumberStartNumber;
-       private final static Short DEFAULT_START_NUMBER = new Short((short)1);
+       private final static Short DEFAULT_START_NUMBER = 1;
        private final int recordLength;
        public TextPFException9(final byte[] source, final int startIndex) {
                //this.mask1 = source[startIndex];