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] [Commented] (ODFTOOLKIT-325) Spreadsheet : Call to cell.getTimeValue on cell marked as valueType TIME but no value set gives NPE
Date Sun, 02 Sep 2012 13:41:07 GMT

    [ https://issues.apache.org/jira/browse/ODFTOOLKIT-325?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13446946#comment-13446946
] 

Andy Jefferson commented on ODFTOOLKIT-325:
-------------------------------------------

Deprecated? You mean I changed to use it from what ODFDOM originally provided, then I will
have to change to something else at some point? I hope that *this time* there will be real
documentation on what the old API call was and what the new API call is, and some actual examples.
                
> 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
>         Attachments: 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

Mime
View raw message