poi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ye...@apache.org
Subject svn commit: r1044405 - in /poi/trunk/src: documentation/content/xdocs/ java/org/apache/poi/hssf/record/ java/org/apache/poi/hssf/record/common/ java/org/apache/poi/hssf/usermodel/ java/org/apache/poi/poifs/dev/ java/org/apache/poi/util/ testcases/org/a...
Date Fri, 10 Dec 2010 15:44:00 GMT
Author: yegor
Date: Fri Dec 10 15:43:59 2010
New Revision: 1044405

URL: http://svn.apache.org/viewvc?rev=1044405&view=rev
Log:
code cleanup as suggested in Bugzilla 50446

Modified:
    poi/trunk/src/documentation/content/xdocs/status.xml
    poi/trunk/src/java/org/apache/poi/hssf/record/SSTSerializer.java
    poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java
    poi/trunk/src/java/org/apache/poi/hssf/usermodel/FontDetails.java
    poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSHeaderDumper.java
    poi/trunk/src/java/org/apache/poi/util/POILogger.java
    poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java
    poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java
    poi/trunk/src/testcases/org/apache/poi/util/DummyPOILogger.java

Modified: poi/trunk/src/documentation/content/xdocs/status.xml
URL: http://svn.apache.org/viewvc/poi/trunk/src/documentation/content/xdocs/status.xml?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/documentation/content/xdocs/status.xml (original)
+++ poi/trunk/src/documentation/content/xdocs/status.xml Fri Dec 10 15:43:59 2010
@@ -34,6 +34,7 @@
 
     <changes>
         <release version="3.8-beta1" date="2010-??-??">
+           <action dev="POI-DEVELOPERS" type="add">50446 - Code cleanup and optimizations
to keep some IDE quiet</action>
            <action dev="POI-DEVELOPERS" type="add">50437 - Support passing ranges to
NPV()</action>
            <action dev="POI-DEVELOPERS" type="add">50409 - Added implementation for
IRR()</action>
            <action dev="poi-developers" type="add">47405 - Improved performance of
RowRecordsAggregate.getStartRowNumberForBlock / getEndRowNumberForBlock</action>

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/SSTSerializer.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/SSTSerializer.java?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/SSTSerializer.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/SSTSerializer.java Fri Dec 10 15:43:59 2010
@@ -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<UnicodeString> strings, int numStrings, int numUniqueStrings
)
     {

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/common/UnicodeString.java Fri Dec 10 15:43:59
2010
@@ -266,7 +266,7 @@ public class UnicodeString implements Co
           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<ext.phRuns.length; i++) {
              ext.phRuns[i] = new PhRun(

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/EscherGraphics2d.java Fri Dec 10 15:43:59
2010
@@ -308,7 +308,7 @@ public final class EscherGraphics2d exte
 
     public void drawString(AttributedCharacterIterator attributedcharacteriterator, int x,
int y)
     {
-        drawString(attributedcharacteriterator, x, y);
+        getEscherGraphics().drawString(attributedcharacteriterator, x, y);
     }
 
     public void fill(Shape shape)

Modified: poi/trunk/src/java/org/apache/poi/hssf/usermodel/FontDetails.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/usermodel/FontDetails.java?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/usermodel/FontDetails.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/usermodel/FontDetails.java Fri Dec 10 15:43:59
2010
@@ -57,7 +57,7 @@ public class FontDetails
 
     public void addChar( char c, int width )
     {
-        charWidths.put(new Character(c), Integer.valueOf(width));
+        charWidths.put(Character.valueOf(c), Integer.valueOf(width));
     }
 
     /**
@@ -67,7 +67,7 @@ public class FontDetails
      */
     public int getCharWidth( char c )
     {
-        Integer widthInteger = charWidths.get(new Character(c));
+        Integer widthInteger = charWidths.get(Character.valueOf(c));
         if (widthInteger == null && c != 'W') {
             return getCharWidth('W');
         }
@@ -78,7 +78,7 @@ public class FontDetails
     {
         for ( int i = 0; i < characters.length; i++ )
         {
-            charWidths.put( new Character(characters[i]), Integer.valueOf(widths[i]));
+            charWidths.put( Character.valueOf(characters[i]), Integer.valueOf(widths[i]));
         }
     }
 

Modified: poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSHeaderDumper.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSHeaderDumper.java?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSHeaderDumper.java (original)
+++ poi/trunk/src/java/org/apache/poi/poifs/dev/POIFSHeaderDumper.java Fri Dec 10 15:43:59
2010
@@ -123,7 +123,7 @@ public class POIFSHeaderDumper {
       gbm.setAccessible(true);
       
       for(int i=0; i<Math.min(16, data_blocks.blockCount()); i++) {
-         ListManagedBlock block = (ListManagedBlock)gbm.invoke(data_blocks, new Integer(i));
+         ListManagedBlock block = (ListManagedBlock)gbm.invoke(data_blocks, Integer.valueOf(i));
          byte[] data = new byte[Math.min(48, block.getData().length)];
          System.arraycopy(block.getData(), 0, data, 0, data.length);
          

Modified: poi/trunk/src/java/org/apache/poi/util/POILogger.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/util/POILogger.java?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/util/POILogger.java (original)
+++ poi/trunk/src/java/org/apache/poi/util/POILogger.java Fri Dec 10 15:43:59 2010
@@ -610,7 +610,7 @@ public abstract class POILogger {
 
             for (int j = 0; j < array.length; j++)
             {
-                results.add(new Character(array[ j ]));
+                results.add(Character.valueOf(array[ j ]));
             }
         }
         else if (object instanceof short [])

Modified: poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/hpsf/basic/TestMetaDataIPI.java Fri Dec 10 15:43:59
2010
@@ -383,7 +383,7 @@ public final class TestMetaDataIPI exten
 			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("<");
@@ -509,7 +509,7 @@ public final class TestMetaDataIPI exten
 			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("<");

Modified: poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java
(original)
+++ poi/trunk/src/testcases/org/apache/poi/ss/util/NumberRenderingSpreadsheetGenerator.java
Fri Dec 10 15:43:59 2010
@@ -63,7 +63,7 @@ public class NumberRenderingSpreadsheetG
 		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));
 			}
 		}
 

Modified: poi/trunk/src/testcases/org/apache/poi/util/DummyPOILogger.java
URL: http://svn.apache.org/viewvc/poi/trunk/src/testcases/org/apache/poi/util/DummyPOILogger.java?rev=1044405&r1=1044404&r2=1044405&view=diff
==============================================================================
--- poi/trunk/src/testcases/org/apache/poi/util/DummyPOILogger.java (original)
+++ poi/trunk/src/testcases/org/apache/poi/util/DummyPOILogger.java Fri Dec 10 15:43:59 2010
@@ -37,10 +37,10 @@ public class DummyPOILogger extends POIL
 	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);
 	}
 }



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


Mime
View raw message