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


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

        

Reply via email to