Details
-
Bug
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.6.1-incubating
-
None
Description
When a named range has only one cell, the function throws a java.lang.ArrayIndexOutOfBoundsException
nov 25, 2015 2:54:42 PM org.odftoolkit.simple.table.Table getCellRangeByName SEVERE: 1 java.lang.ArrayIndexOutOfBoundsException: 1 at org.odftoolkit.simple.table.Table.getCellRangeByName(Table.java:2625) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:497)
This is due the lines in
Table.java ln: 2830 col: 21
String cellRange = nameRange.getTableCellRangeAddressAttribute(); String[] addresses = cellRange.split(":"); return getCellRangeByPosition(addresses[0], addresses[1]);
if the named range only has one cell, the cellRange contains only one address and the algorithm is expecting: "address:address"