chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller (JIRA) <j...@apache.org>
Subject [jira] [Resolved] (CMIS-424) org.apache.chemistry.opencmis.commons.impl.Converter.convertXMLCalendar(Converter.java:1906) does not handle empty date properties
Date Thu, 25 Aug 2011 13:26:30 GMT

     [ https://issues.apache.org/jira/browse/CMIS-424?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Florian Müller resolved CMIS-424.
---------------------------------

       Resolution: Fixed
    Fix Version/s: OpenCMIS 0.5.0
         Assignee: Florian Müller

The server is not CMIS spec compliant. It either must return a valid date or no cmis:value
tag at all.

Nevertheless, I have added a NullPointer check.

Thanks for the report!

> org.apache.chemistry.opencmis.commons.impl.Converter.convertXMLCalendar(Converter.java:1906)
does not handle empty date properties
> ----------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: CMIS-424
>                 URL: https://issues.apache.org/jira/browse/CMIS-424
>             Project: Chemistry
>          Issue Type: Bug
>          Components: opencmis-client-bindings, opencmis-commons
>    Affects Versions: OpenCMIS 0.4.0
>            Reporter: Ernest E Davis
>            Assignee: Florian Müller
>             Fix For: OpenCMIS 0.5.0
>
>
> If the repository returns a date property with no value, date conversion fails with a
NPE.  Eg for date property like:
>     <cmis:propertyDateTime propertyDefinitionId="snx:lockedWhen" localName="snx_lockedWhen"
displayName="Lock Date" queryName="snx:lockedWhen">
>         <cmis:value></cmis:value>
>     </cmis:propertyDateTime>
> on a subtype of cmis:file, we get the following failure:
>     Exception in thread "main" java.lang.NullPointerException
> 	at org.apache.chemistry.opencmis.commons.impl.Converter.convertXMLCalendar(Converter.java:1906)
> 	at org.apache.chemistry.opencmis.commons.impl.Converter.convert(Converter.java:1413)
> 	at org.apache.chemistry.opencmis.commons.impl.Converter.convert(Converter.java:1379)
> 	at org.apache.chemistry.opencmis.commons.impl.Converter.convert(Converter.java:1350)
> 	at org.apache.chemistry.opencmis.client.bindings.spi.atompub.AbstractAtomPubService.getObjectInternal(AbstractAtomPubService.java:795)
> 	at org.apache.chemistry.opencmis.client.bindings.spi.atompub.ObjectServiceImpl.getObject(ObjectServiceImpl.java:433)
> 	at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:393)
> 	at org.apache.chemistry.opencmis.client.runtime.SessionImpl.getObject(SessionImpl.java:367)
> 	at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:97)
> 	at org.apache.chemistry.opencmis.client.runtime.FolderImpl.createDocument(FolderImpl.java:444)
> ...

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message