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