]> source.dussan.org Git - poi.git/commitdiff
fixed ArrayIndexOutOfBoundsException in the format(short, double) method
authorSean Sullivan <sullis@apache.org>
Tue, 18 Apr 2006 05:21:06 +0000 (05:21 +0000)
committerSean Sullivan <sullis@apache.org>
Tue, 18 Apr 2006 05:21:06 +0000 (05:21 +0000)
git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@394843 13f79535-47bb-0310-9956-ffa450edef68

src/contrib/src/org/apache/poi/hssf/contrib/view/SVTableCellRenderer.java

index d3370aa56c11324c25840aaed1bcb1bbac7f4c8b..9b33f3c170169b9a3e4d71d04bbb73cf3efe2354 100644 (file)
@@ -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));