]> source.dussan.org Git - poi.git/commitdiff
Fix typo to "length", closes #51
authorDominik Stadler <centic@apache.org>
Sun, 19 Mar 2017 20:30:04 +0000 (20:30 +0000)
committerDominik Stadler <centic@apache.org>
Sun, 19 Mar 2017 20:30:04 +0000 (20:30 +0000)
Fix a few IntelliJ warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787659 13f79535-47bb-0310-9956-ffa450edef68

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

index 15c9475cfb26eb38d652c2445ddf2bb5346e7a4e..642c3056d17f48d2676905cd53133c6500f465bd 100644 (file)
@@ -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");
                     }
 
index b10c19a99e1283acdbcf2205535674cb5cae7847..e09b806583d515afbf25ad3a4b30b622457a6de5 100644 (file)
@@ -419,7 +419,7 @@ public final class CFRule12Record extends CFRuleBase implements FutureRecord, Cl
     }
 
     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 extends CFRuleBase implements FutureRecord, Cl
         
         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];
index 0cfaa3fc1e11fc96c484347abd4985bc8ee5233c..fddbe677e27350a31dbe15148d638f8af37d524a 100644 (file)
@@ -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 startPos, int maxLen) throws IOException {
 
         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 startPos, int maxLen) throws IOException {
        }
 
        // 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 startPos, int maxLen) throws IOException {
                }
        }
 
-       // 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 startPos, int maxLen) throws IOException {
        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 startPos, int maxLen) throws IOException {
        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);
        }