findbugs - DM_NUMBER_CTOR

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1695635 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Andreas Beeker 2015-08-13 00:38:04 +00:00
parent 3ac2d2905a
commit 0e1aa75750
10 changed files with 20 additions and 20 deletions

View File

@ -178,7 +178,7 @@ public final class SharedValueManager {
private Integer getKeyForCache(final CellReference cellRef) { private Integer getKeyForCache(final CellReference cellRef) {
// The HSSF has a max of 2^16 rows and 2^8 cols // 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());
} }
/** /**

View File

@ -135,7 +135,7 @@ public class SXSSFSheet implements Sheet, Cloneable
if(initialAllocationSize<=0) if(initialAllocationSize<=0)
initialAllocationSize=10; initialAllocationSize=10;
SXSSFRow newRow=new SXSSFRow(this,initialAllocationSize); SXSSFRow newRow=new SXSSFRow(this,initialAllocationSize);
_rows.put(new Integer(rownum),newRow); _rows.put(rownum,newRow);
allFlushed = false; allFlushed = false;
if(_randomAccessWindowSize>=0&&_rows.size()>_randomAccessWindowSize) if(_randomAccessWindowSize>=0&&_rows.size()>_randomAccessWindowSize)
{ {
@ -182,7 +182,7 @@ public class SXSSFSheet implements Sheet, Cloneable
*/ */
public SXSSFRow getRow(int rownum) 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) public void setRowOutlineLevel(int rownum, int level)
{ {
SXSSFRow row = _rows.get(new Integer(rownum)); SXSSFRow row = _rows.get(rownum);
row.setOutlineLevel(level); row.setOutlineLevel(level);
if(level > 0 && level > outlineLevelRow) { if(level > 0 && level > outlineLevelRow) {
outlineLevelRow = level; outlineLevelRow = level;
@ -1513,7 +1513,7 @@ public class SXSSFSheet implements Sheet, Cloneable
{ {
removeRow(row); removeRow(row);
_rows.put(new Integer(newRowNum),row); _rows.put(newRowNum,row);
} }
public int getRowNum(SXSSFRow row) public int getRowNum(SXSSFRow row)

View File

@ -87,7 +87,7 @@ public enum BreakClear {
static { static {
for (BreakClear p : values()) { 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) { public static BreakClear valueOf(int type) {
BreakClear bType = imap.get(new Integer(type)); BreakClear bType = imap.get(type);
if (bType == null) if (bType == null)
throw new IllegalArgumentException("Unknown break clear type: " throw new IllegalArgumentException("Unknown break clear type: "
+ type); + type);

View File

@ -60,7 +60,7 @@ public enum BreakType {
static { static {
for (BreakType p : values()) { 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) { public static BreakType valueOf(int type) {
BreakType bType = imap.get(new Integer(type)); BreakType bType = imap.get(type);
if (bType == null) if (bType == null)
throw new IllegalArgumentException("Unknown break type: " throw new IllegalArgumentException("Unknown break type: "
+ type); + type);

View File

@ -53,7 +53,7 @@ public enum LineSpacingRule {
static { static {
for (LineSpacingRule p : values()) { 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) { public static LineSpacingRule valueOf(int type) {
LineSpacingRule lineType = imap.get(new Integer(type)); LineSpacingRule lineType = imap.get(type);
if (lineType == null) if (lineType == null)
throw new IllegalArgumentException("Unknown line type: " + type); throw new IllegalArgumentException("Unknown line type: " + type);
return lineType; return lineType;

View File

@ -44,7 +44,7 @@ public enum ParagraphAlignment {
static { static {
for (ParagraphAlignment p : values()) { 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) { 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); if (err == null) throw new IllegalArgumentException("Unknown paragraph alignment: " + type);
return err; return err;
} }

View File

@ -56,7 +56,7 @@ public enum TextAlignment {
static { static {
for (TextAlignment p : values()) { 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) { 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); if (align == null) throw new IllegalArgumentException("Unknown text alignment: " + type);
return align; return align;
} }

View File

@ -139,7 +139,7 @@ public enum UnderlinePatterns {
static { static {
for (UnderlinePatterns p : values()) { 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) { public static UnderlinePatterns valueOf(int type) {
UnderlinePatterns align = imap.get(new Integer(type)); UnderlinePatterns align = imap.get(type);
if (align == null) if (align == null)
throw new IllegalArgumentException("Unknown underline pattern: " throw new IllegalArgumentException("Unknown underline pattern: "
+ type); + type);

View File

@ -51,7 +51,7 @@ public enum VerticalAlign {
static { static {
for (VerticalAlign p : values()) { 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) { public static VerticalAlign valueOf(int type) {
VerticalAlign align = imap.get(new Integer(type)); VerticalAlign align = imap.get(type);
if (align == null) if (align == null)
throw new IllegalArgumentException("Unknown vertical alignment: " throw new IllegalArgumentException("Unknown vertical alignment: "
+ type); + type);

View File

@ -44,7 +44,7 @@ public class TextPFException9 {
private final AutoNumberingScheme autoNumberScheme; private final AutoNumberingScheme autoNumberScheme;
private final static AutoNumberingScheme DEFAULT_AUTONUMBER_SHEME = AutoNumberingScheme.arabicPeriod; private final static AutoNumberingScheme DEFAULT_AUTONUMBER_SHEME = AutoNumberingScheme.arabicPeriod;
private final Short autoNumberStartNumber; 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; private final int recordLength;
public TextPFException9(final byte[] source, final int startIndex) { public TextPFException9(final byte[] source, final int startIndex) {
//this.mask1 = source[startIndex]; //this.mask1 = source[startIndex];