[
https://issues.apache.org/jira/browse/ODFTOOLKIT-325?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Florian Hopf updated ODFTOOLKIT-325:
------------------------------------
Fix Version/s: 0.6-incubating
Affects Version/s: (was: odfdom-0.8.7)
0.5-incubating
> 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.5-incubating
> Environment: Linux, JDK1.6
> Reporter: Andy Jefferson
> Assignee: Florian Hopf
> Fix For: 0.6-incubating
>
> Attachments: testcase-fix-ODFTOOLKIT-325-2.patch,
> testcase-fix-ODFTOOLKIT-325.patch
>
>
> 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
For more information on JIRA, see: http://www.atlassian.com/software/jira