From 19aa234f371ce0e5a0b68ee6b579103af4a01e36 Mon Sep 17 00:00:00 2001 From: Dominik Stadler Date: Wed, 26 Nov 2014 21:11:18 +0000 Subject: [PATCH] Typo and remove unnecessary casts git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1641941 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/org/apache/poi/hdgf/chunks/ChunkFactory.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java b/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java index 47fa5830d0..3c490a24d0 100644 --- a/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java +++ b/src/scratchpad/src/org/apache/poi/hdgf/chunks/ChunkFactory.java @@ -95,8 +95,7 @@ public final class ChunkFactory { defsL.add(def); } - CommandDefinition[] defs = (CommandDefinition[]) - defsL.toArray(new CommandDefinition[defsL.size()]); + CommandDefinition[] defs = defsL.toArray(new CommandDefinition[defsL.size()]); // Add to the hashtable chunkCommandDefinitions.put(Integer.valueOf(chunkType), defs); @@ -128,7 +127,7 @@ public final class ChunkFactory { // as required if(endOfDataPos > data.length) { 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; header.length = data.length - offset - header.getSizeInBytes(); @@ -171,8 +170,7 @@ public final class ChunkFactory { Chunk chunk = new Chunk(header, trailer, separator, contents); // Feed in the stuff from chunks_parse_cmds.tbl - CommandDefinition[] defs = (CommandDefinition[]) - chunkCommandDefinitions.get(Integer.valueOf(header.getType())); + CommandDefinition[] defs = chunkCommandDefinitions.get(Integer.valueOf(header.getType())); if(defs == null) defs = new CommandDefinition[0]; chunk.commandDefinitions = defs;