Typo and remove unnecessary casts
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1641941 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
1deed31c23
commit
81a3425f16
@ -95,8 +95,7 @@ public final class ChunkFactory {
|
|||||||
defsL.add(def);
|
defsL.add(def);
|
||||||
}
|
}
|
||||||
|
|
||||||
CommandDefinition[] defs = (CommandDefinition[])
|
CommandDefinition[] defs = defsL.toArray(new CommandDefinition[defsL.size()]);
|
||||||
defsL.toArray(new CommandDefinition[defsL.size()]);
|
|
||||||
|
|
||||||
// Add to the hashtable
|
// Add to the hashtable
|
||||||
chunkCommandDefinitions.put(Integer.valueOf(chunkType), defs);
|
chunkCommandDefinitions.put(Integer.valueOf(chunkType), defs);
|
||||||
@ -128,7 +127,7 @@ public final class ChunkFactory {
|
|||||||
// as required
|
// as required
|
||||||
if(endOfDataPos > data.length) {
|
if(endOfDataPos > data.length) {
|
||||||
logger.log(POILogger.WARN,
|
logger.log(POILogger.WARN,
|
||||||
"Header called for " + header.getLength() +" bytes, but that would take us passed the end of the data!");
|
"Header called for " + header.getLength() +" bytes, but that would take us past the end of the data!");
|
||||||
|
|
||||||
endOfDataPos = data.length;
|
endOfDataPos = data.length;
|
||||||
header.length = data.length - offset - header.getSizeInBytes();
|
header.length = data.length - offset - header.getSizeInBytes();
|
||||||
@ -171,8 +170,7 @@ public final class ChunkFactory {
|
|||||||
Chunk chunk = new Chunk(header, trailer, separator, contents);
|
Chunk chunk = new Chunk(header, trailer, separator, contents);
|
||||||
|
|
||||||
// Feed in the stuff from chunks_parse_cmds.tbl
|
// Feed in the stuff from chunks_parse_cmds.tbl
|
||||||
CommandDefinition[] defs = (CommandDefinition[])
|
CommandDefinition[] defs = chunkCommandDefinitions.get(Integer.valueOf(header.getType()));
|
||||||
chunkCommandDefinitions.get(Integer.valueOf(header.getType()));
|
|
||||||
if(defs == null) defs = new CommandDefinition[0];
|
if(defs == null) defs = new CommandDefinition[0];
|
||||||
chunk.commandDefinitions = defs;
|
chunk.commandDefinitions = defs;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user