Author: centic
Date: Sun Mar 19 20:30:04 2017
New Revision: 1787659

URL: http://svn.apache.org/viewvc?rev=1787659&view=rev
Log:
Fix typo to "length", closes #51
Fix a few IntelliJ warnings

Modified:
    poi/trunk/src/java/org/apache/poi/ddf/EscherPropertyFactory.java
    poi/trunk/src/java/org/apache/poi/hssf/record/CFRule12Record.java
    poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java

Modified: poi/trunk/src/java/org/apache/poi/ddf/EscherPropertyFactory.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/ddf/EscherPropertyFactory.java?rev=1787659&r1=1787658&r2=1787659&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/ddf/EscherPropertyFactory.java (original)
+++ poi/trunk/src/java/org/apache/poi/ddf/EscherPropertyFactory.java Sun Mar 19 
20:30:04 2017
@@ -84,7 +84,7 @@ public final class EscherPropertyFactory
 
                     int leftover = data.length - pos;
                     if (leftover < complexData.length) {
-                        throw new IllegalStateException("Could not read 
complex escher property, lenght was " + complexData.length + ", but had only " +
+                        throw new IllegalStateException("Could not read 
complex escher property, length was " + complexData.length + ", but had only " +
                                 leftover + " bytes left");
                     }
 

Modified: poi/trunk/src/java/org/apache/poi/hssf/record/CFRule12Record.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/java/org/apache/poi/hssf/record/CFRule12Record.java?rev=1787659&r1=1787658&r2=1787659&view=diff
==============================================================================
--- poi/trunk/src/java/org/apache/poi/hssf/record/CFRule12Record.java (original)
+++ poi/trunk/src/java/org/apache/poi/hssf/record/CFRule12Record.java Sun Mar 
19 20:30:04 2017
@@ -419,7 +419,7 @@ public final class CFRule12Record extend
     }
 
     public String toString() {
-        StringBuffer buffer = new StringBuffer();
+        StringBuilder buffer = new StringBuilder();
         buffer.append("[CFRULE12]\n");
         buffer.append("    
.condition_type=").append(getConditionType()).append("\n");
         buffer.append("    .dxfn12_length 
=0x").append(Integer.toHexString(ext_formatting_length)).append("\n");
@@ -462,7 +462,7 @@ public final class CFRule12Record extend
         
         super.copyTo(rec);
 
-        // use min() to gracefully handle cases where the length-property and 
the array-lenght do not match
+        // use min() to gracefully handle cases where the length-property and 
the array-length do not match
         // we saw some such files in circulation
         rec.ext_formatting_length = Math.min(ext_formatting_length, 
ext_formatting_data.length);
         rec.ext_formatting_data = new byte[ext_formatting_length];

Modified: 
poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java
URL: 
http://svn.apache.org/viewvc/poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java?rev=1787659&r1=1787658&r2=1787659&view=diff
==============================================================================
--- poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java 
(original)
+++ poi/trunk/src/scratchpad/src/org/apache/poi/hslf/dev/SlideShowDumper.java 
Sun Mar 19 20:30:04 2017
@@ -50,9 +50,9 @@ public final class SlideShowDumper {
   private byte[] docstream;
 
   /** Do we try to use DDF to understand the escher objects? */
-  private boolean ddfEscher = false;
+  private boolean ddfEscher;
   /** Do we use our own built-in basic escher groker to understand the escher 
objects? */
-  private boolean basicEscher = false;
+  private boolean basicEscher;
   
   private PrintStream out;
 
@@ -182,7 +182,7 @@ public void walkTree(int depth, int star
 
         out.println();
                if (type != 0L && container == 0x0f) {
-                   if (type == 1035l || type == 1036l) {
+                   if (type == 1035L || type == 1036L) {
                        // Special Handling of 1035=PPDrawingGroup and 
1036=PPDrawing
                        if(ddfEscher) {
                                // Seems to be:
@@ -240,11 +240,11 @@ public void walkTree(int depth, int star
        }
 
        // Handle records that seem to lie
-       if(atomType == 61451l) {
+       if(atomType == 61451L) {
                // Normally claims a size of 8
                recordLen = (int)atomLen + 8;
        }
-       if(atomType == 61453l) {
+       if(atomType == 61453L) {
                // Returns EscherContainerRecord, but really msofbtClientTextbox
                recordLen = (int)atomLen + 8;
                record.fillFields( contents, 0, erf );
@@ -253,7 +253,7 @@ public void walkTree(int depth, int star
                }
        }
 
-       // Decide on what to do, based on how the lenghts match up
+       // Decide on what to do, based on how the lengths match up
        if(recordLen == 8 && atomLen > 8 ) {
                // Assume it has children, rather than being corrupted
                walkEscherDDF((indent+3), pos + 8, (int)atomLen );
@@ -295,7 +295,7 @@ public void walkTree(int depth, int star
        out.println(String.format(Locale.ROOT, ind+"%2$s", "That's an Escher 
Record: ", typeName));
 
        // Record specific dumps
-       if(type == 61453l) {
+       if(type == 61453L) {
                // Text Box. Print out first 8 bytes of data, then 8 4 later
            HexDump.dump(docstream, 0, out, pos+8, 8);
            HexDump.dump(docstream, 0, out, pos+20, 8);
@@ -307,7 +307,7 @@ public void walkTree(int depth, int star
        out.println();
 
        // Look in children if we are a container
-       if(type == 61443l || type == 61444l) {
+       if(type == 61443L || type == 61444L) {
                walkEscherBasic((indent+3), pos+8, (int)atomlen);
        }
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to