poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kiwiwi...@apache.org
Subject svn commit: r1695635 - in /poi/trunk/src: java/org/apache/poi/hssf/record/aggregates/ ooxml/java/org/apache/poi/xssf/streaming/ ooxml/java/org/apache/poi/xwpf/usermodel/ scratchpad/src/org/apache/poi/hslf/model/textproperties/
Date Thu, 13 Aug 2015 00:38:05 GMT
Author: kiwiwings
Date: Thu Aug 13 00:38:04 2015
New Revision: 1695635

URL: http://svn.apache.org/r1695635
Log:
findbugs - DM_NUMBER_CTOR

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

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/aggregates/SharedValueManager.java Thu Aug
13 00:38:04 2015
@@ -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());
     }
 
 	/**

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java Thu Aug 13 00:38:04
2015
@@ -135,7 +135,7 @@ public class SXSSFSheet implements Sheet
         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
      */
     public SXSSFRow getRow(int rownum)
     {
-        return _rows.get(new Integer(rownum));
+        return _rows.get(rownum);
     }
 
     /**
@@ -1165,7 +1165,7 @@ public class SXSSFSheet implements Sheet
      */
     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
     {
         
         removeRow(row);
-        _rows.put(new Integer(newRowNum),row);
+        _rows.put(newRowNum,row);
     }
 
     public int getRowNum(SXSSFRow row)

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakClear.java Thu Aug 13 00:38:04
2015
@@ -87,7 +87,7 @@ public enum BreakClear {
 
     static {
         for (BreakClear p : values()) {
-            imap.put(new Integer(p.getValue()), p);
+            imap.put(p.getValue(), p);
         }
     }
 
@@ -98,7 +98,7 @@ public enum BreakClear {
     }
 
     public static BreakClear valueOf(int type) {
-        BreakClear bType = imap.get(new Integer(type));
+        BreakClear bType = imap.get(type);
         if (bType == null)
             throw new IllegalArgumentException("Unknown break clear type: "
                     + type);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/BreakType.java Thu Aug 13 00:38:04
2015
@@ -60,7 +60,7 @@ public enum BreakType {
 
     static {
         for (BreakType p : values()) {
-            imap.put(new Integer(p.getValue()), p);
+            imap.put(p.getValue(), p);
         }
     }
 
@@ -71,7 +71,7 @@ public enum BreakType {
     }
 
     public static BreakType valueOf(int type) {
-        BreakType bType = imap.get(new Integer(type));
+        BreakType bType = imap.get(type);
         if (bType == null)
             throw new IllegalArgumentException("Unknown break type: "
                     + type);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/LineSpacingRule.java Thu Aug 13
00:38:04 2015
@@ -53,7 +53,7 @@ public enum LineSpacingRule {
 
     static {
         for (LineSpacingRule p : values()) {
-            imap.put(new Integer(p.getValue()), p);
+            imap.put(p.getValue(), p);
         }
     }
 
@@ -64,7 +64,7 @@ public enum LineSpacingRule {
     }
 
     public static LineSpacingRule valueOf(int type) {
-        LineSpacingRule lineType = imap.get(new Integer(type));
+        LineSpacingRule lineType = imap.get(type);
         if (lineType == null)
             throw new IllegalArgumentException("Unknown line type: " + type);
         return lineType;

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/ParagraphAlignment.java Thu Aug
13 00:38:04 2015
@@ -44,7 +44,7 @@ public enum ParagraphAlignment {
 
     static {
         for (ParagraphAlignment p : values()) {
-            imap.put(new Integer(p.getValue()), p);
+            imap.put(p.getValue(), p);
         }
     }
 
@@ -55,7 +55,7 @@ public enum ParagraphAlignment {
     }
 
     public static ParagraphAlignment valueOf(int type) {
-        ParagraphAlignment err = imap.get(new Integer(type));
+        ParagraphAlignment err = imap.get(type);
         if (err == null) throw new IllegalArgumentException("Unknown paragraph alignment:
" + type);
         return err;
     }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/TextAlignment.java Thu Aug 13 00:38:04
2015
@@ -56,7 +56,7 @@ public enum TextAlignment {
 
     static {
         for (TextAlignment p : values()) {
-            imap.put(new Integer(p.getValue()), p);
+            imap.put(p.getValue(), p);
         }
     }
 
@@ -67,7 +67,7 @@ public enum TextAlignment {
     }
 
     public static TextAlignment valueOf(int type) {
-        TextAlignment align = imap.get(new Integer(type));
+        TextAlignment align = imap.get(type);
         if (align == null) throw new IllegalArgumentException("Unknown text alignment: "
+ type);
         return align;
     }

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/UnderlinePatterns.java Thu Aug
13 00:38:04 2015
@@ -139,7 +139,7 @@ public enum UnderlinePatterns {
 
     static {
         for (UnderlinePatterns p : values()) {
-            imap.put(new Integer(p.getValue()), p);
+            imap.put(p.getValue(), p);
         }
     }
 
@@ -150,7 +150,7 @@ public enum UnderlinePatterns {
     }
 
     public static UnderlinePatterns valueOf(int type) {
-        UnderlinePatterns align = imap.get(new Integer(type));
+        UnderlinePatterns align = imap.get(type);
         if (align == null)
             throw new IllegalArgumentException("Unknown underline pattern: "
                     + type);

Modified: poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java (original)
+++ poi/trunk/src/ooxml/java/org/apache/poi/xwpf/usermodel/VerticalAlign.java Thu Aug 13 00:38:04
2015
@@ -51,7 +51,7 @@ public enum VerticalAlign {
 
     static {
         for (VerticalAlign p : values()) {
-            imap.put(new Integer(p.getValue()), p);
+            imap.put(p.getValue(), p);
         }
     }
 
@@ -62,7 +62,7 @@ public enum VerticalAlign {
     }
 
     public static VerticalAlign valueOf(int type) {
-        VerticalAlign align = imap.get(new Integer(type));
+        VerticalAlign align = imap.get(type);
         if (align == null)
             throw new IllegalArgumentException("Unknown vertical alignment: "
                     + type);

Modified: poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java?rev=1695635&r1=1695634&r2=1695635&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/model/textproperties/TextPFException9.java
Thu Aug 13 00:38:04 2015
@@ -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];



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


Mime
View raw message