From: Yegor Kozlov Date: Fri, 10 Dec 2010 15:43:59 +0000 (+0000) Subject: code cleanup as suggested in Bugzilla 50446 X-Git-Tag: REL_3_8_BETA1~105 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=544463463a14da8f4af4fdb517e7c7ce583025ed;p=poi.git code cleanup as suggested in Bugzilla 50446 git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1044405 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/documentation/content/xdocs/status.xml b/src/documentation/content/xdocs/status.xml index f120102386..9ee283fcb0 100644 --- a/src/documentation/content/xdocs/status.xml +++ b/src/documentation/content/xdocs/status.xml @@ -34,6 +34,7 @@ + 50446 - Code cleanup and optimizations to keep some IDE quiet 50437 - Support passing ranges to NPV() 50409 - Added implementation for IRR() 47405 - Improved performance of RowRecordsAggregate.getStartRowNumberForBlock / getEndRowNumberForBlock diff --git a/src/java/org/apache/poi/hssf/record/SSTSerializer.java b/src/java/org/apache/poi/hssf/record/SSTSerializer.java index 44980f54e5..c15c7ad1ff 100644 --- a/src/java/org/apache/poi/hssf/record/SSTSerializer.java +++ b/src/java/org/apache/poi/hssf/record/SSTSerializer.java @@ -38,7 +38,6 @@ final class SSTSerializer { private final int[] bucketAbsoluteOffsets; /** Offsets relative the start of the current SST or continue record */ private final int[] bucketRelativeOffsets; - int startOfSST, startOfRecord; public SSTSerializer( IntMapper strings, int numStrings, int numUniqueStrings ) { diff --git a/src/java/org/apache/poi/hssf/record/common/UnicodeString.java b/src/java/org/apache/poi/hssf/record/common/UnicodeString.java index 235d547091..3d0813c87b 100644 --- a/src/java/org/apache/poi/hssf/record/common/UnicodeString.java +++ b/src/java/org/apache/poi/hssf/record/common/UnicodeString.java @@ -266,7 +266,7 @@ public class UnicodeString implements Comparable { // TODO - make ext.formattingFontIndex = formattingFontIndex; ext.formattingOptions = formattingOptions; ext.numberOfRuns = numberOfRuns; - ext.phoneticText = new String(phoneticText); + ext.phoneticText = phoneticText; ext.phRuns = new PhRun[phRuns.length]; for(int i=0; i"); - sb.append(new Character(j)); + sb.append(Character.valueOf(j)); sb.append("="); sb.append(umlaute[rand.nextInt(umlaute.length)]); sb.append("<"); @@ -509,7 +509,7 @@ public final class TestMetaDataIPI extends TestCase{ j += 33; // System.out.println(j); sb.append(">"); - sb.append(new Character(j)); + sb.append(Character.valueOf(j)); sb.append("="); sb.append(umlaute[rand.nextInt(umlaute.length)]); sb.append("<"); diff --git a/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java b/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java index a03bfb0848..c074c97379 100644 --- a/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java +++ b/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java @@ -63,7 +63,7 @@ public class NumberRenderingSpreadsheetGenerator { public void addTestRow(long rawBits, String expectedExcelRendering) { writeDataRow(_sheet, _rowIndex++, rawBits, expectedExcelRendering); if(Double.isNaN(Double.longBitsToDouble(rawBits))) { - _replacementNaNs.add(new Long(rawBits)); + _replacementNaNs.add(Long.valueOf(rawBits)); } } diff --git a/src/testcases/org/apache/poi/util/DummyPOILogger.java b/src/testcases/org/apache/poi/util/DummyPOILogger.java index 7efbfac293..f72e37b512 100644 --- a/src/testcases/org/apache/poi/util/DummyPOILogger.java +++ b/src/testcases/org/apache/poi/util/DummyPOILogger.java @@ -37,10 +37,10 @@ public class DummyPOILogger extends POILogger { public void initialize(String cat) {} public void log(int level, Object obj1) { - logged.add(new String(level + " - " + obj1)); + logged.add(level + " - " + obj1); } public void log(int level, Object obj1, Throwable exception) { - logged.add(new String(level + " - " + obj1 + " - " + exception)); + logged.add(level + " - " + obj1 + " - " + exception); } }