Uploaded image for project: 'Chemistry (Retired)'
  1. Chemistry (Retired)
  2. CMIS-424

org.apache.chemistry.opencmis.commons.impl.Converter.convertXMLCalendar(Converter.java:1906) does not handle empty date properties

    XMLWordPrintableJSON

Details

    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)
      ...

      Attachments

        Activity

          People

            fmui Florian Müller
            eedavis@us.ibm.com Ernest E Davis
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: