incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Kabdebo (JIRA)" <>
Subject [jira] [Created] (ODFTOOLKIT-360) comparison of tablnames on setting data to the dataset is wrong and fails
Date Wed, 13 Mar 2013 07:48:13 GMT
Michael Kabdebo created ODFTOOLKIT-360:

             Summary: comparison of tablnames on setting data to the dataset is wrong and
                 Key: ODFTOOLKIT-360
             Project: ODF Toolkit
          Issue Type: Bug
          Components: simple api
    Affects Versions: 0.7-incubating
            Reporter: Michael Kabdebo
            Priority: Blocker

I'm using a cell range address like this:  'TableName'.A1:'TableName.EN4' 
This is a valid format and matches the regex in the class CellRangeAddress.class.

In DataSet:618 you are going through a NodeList to find the table by a given name. The given
table name has been extracted from the cell range address.

The problem: the extracted table name contains the quotes chars and no table will be found
in this case, because: 'Tablename' != TableName

possible solution:

private boolean matchingTable(String extractedName, String tableName){
    if(extractedName != null && extractedName.startsWith("'")&& extractedName.endsWith("'")){
       extractedName = extractedName.substring(1, extractedName.length()-1);
    if(tableName != null && tableName.startsWith("'")&& tableName.endsWith("'")){
        tableName = tableName.substring(1, tableName.length()-1);
    return extractedName.equals(tableName);

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:

View raw message