Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
OpenCMIS 0.4.0
-
None
Description
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)
...