diff --git a/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java b/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java index f4287ce4b5..40799029be 100644 --- a/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java +++ b/src/java/org/apache/poi/hssf/usermodel/HSSFOptimiser.java @@ -30,7 +30,7 @@ import org.apache.poi.ss.usermodel.Row; * Excel can get cranky if you give it files containing too * many (especially duplicate) objects, and this class can * help to avoid those. - * In general, it's much better to make sure you don't + * In general, it's much better to make sure you don't * duplicate the objects in your code, as this is likely * to be much faster than creating lots and lots of * excel objects+records, only to optimise them down to @@ -52,27 +52,27 @@ public class HSSFOptimiser { public static void optimiseFonts(HSSFWorkbook workbook) { // Where each font has ended up, and if we need to // delete the record for it. Start off with no change - short[] newPos = + short[] newPos = new short[workbook.getWorkbook().getNumberOfFontRecords()+1]; boolean[] zapRecords = new boolean[newPos.length]; for(int i=0; i