incubator-odf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andy Jefferson (JIRA)" <j...@apache.org>
Subject [jira] [Created] (ODFTOOLKIT-325) Spreadsheet : Call to cell.getTimeValue on cell marked as valueType TIME but no value set gives NPE
Date Thu, 19 Jul 2012 10:39:33 GMT
Andy Jefferson created ODFTOOLKIT-325:
-----------------------------------------

             Summary: Spreadsheet : Call to cell.getTimeValue on cell marked as valueType
TIME but no value set gives NPE 
                 Key: ODFTOOLKIT-325
                 URL: https://issues.apache.org/jira/browse/ODFTOOLKIT-325
             Project: ODF Toolkit
          Issue Type: Bug
          Components: odfdom
    Affects Versions: 0.8.7
         Environment: Linux, JDK1.6
            Reporter: Andy Jefferson


Create a spreadsheet with a cell. Call
cell.setValueType(OfficeValueTypeAttribute.Value.TIME.toString());

then call
cell.getTimeValue();

gives
java.lang.NullPointerException
        at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1234)
        at java.text.DateFormat.parse(DateFormat.java:335)
        at org.odftoolkit.odfdom.doc.table.OdfTableCell.parseString(OdfTableCell.java:920)
        at org.odftoolkit.odfdom.doc.table.OdfTableCell.getTimeValue(OdfTableCell.java:886)



I'd expect null if no value is set. Blowing its brains out is not considered a reasonable
reply.

The same thing using DATE valueType doesn't cause this AFAIK

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message