From: Sean Sullivan Date: Tue, 18 Apr 2006 05:21:06 +0000 (+0000) Subject: fixed ArrayIndexOutOfBoundsException in the format(short, double) method X-Git-Tag: REL_3_0_ALPHA3~122 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=6e09c4be55f37637df780340f58da47689f7833a;p=poi.git fixed ArrayIndexOutOfBoundsException in the format(short, double) method git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@394843 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java index d3370aa56c..9b33f3c170 100644 --- a/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java +++ b/src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java @@ -112,7 +112,7 @@ public class SVTableCellRenderer extends JLabel } public String format(short index, double value) { - if (index == 0) + if ( index <= 0 ) return generalNumberFormat.format(value); if (textFormatter[index] == null) throw new RuntimeException("Sorry. I cant handle the format code :"+Integer.toHexString(index));