Hugo Ojendiz created ODFTOOLKIT-411:
---------------------------------------

             Summary: org.odftoolkit.simple.table.Table getCellRangeByName 
throws ArrayIndexOutOfBoundsException
                 Key: ODFTOOLKIT-411
                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-411
             Project: ODF Toolkit
          Issue Type: Bug
          Components: simple api
    Affects Versions: 0.6.1-incubating
            Reporter: Hugo Ojendiz
            Priority: Minor


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:addess"



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to