Fix typo to "length", closes #51

Fix a few IntelliJ warnings

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1787659 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Dominik Stadler 2017-03-19 20:30:04 +00:00
parent e78eb68b10
commit eef36a1580
3 changed files with 11 additions and 11 deletions

View 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");
}

View 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];

View 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);
}