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
This commit is contained in:
Sean Sullivan 2006-04-18 05:21:06 +00:00
parent 1bb312f416
commit 5b5ac869b3
1 changed files with 1 additions and 1 deletions

View 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));