[
https://issues.apache.org/jira/browse/SLING-10020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17263772#comment-17263772
]
Eric Norman commented on SLING-10020:
-------------------------------------
FYI: The change history shows that the date parsing was changed to the ISO8601
format for the SLING-7590 fix
> importing date property using sling post servlet fails
> ------------------------------------------------------
>
> Key: SLING-10020
> URL: https://issues.apache.org/jira/browse/SLING-10020
> Project: Sling
> Issue Type: Bug
> Components: Servlets
> Affects Versions: JCR ContentLoader 2.2.4, JCR ContentLoader 2.4.0,
> Servlets Post 2.3.26
> Environment: AEM 6.5.6
> Reporter: Johannes Das
> Priority: Minor
>
> The issue happens when the import operation of the sling post servlet(2.3.26)
> is used:
> An imported data-structure contains a date like
> "2018-09-18T22:00:00.000+0000" results in a nullpointer beeing thrown without
> any clear logging.
> This happens because
> org.apache.sling.jcr.contentloader.internal.readers.JsonReader(2.2.6) accepts
> it as a date(line 280) and in
> org.apache.sling.jcr.contentloader.internal.DefaultContentCreator(2.2.6)
> (line 309) it tries to parse the date-string into a calendar object which
> fails bacause it expects a string like "2018-09-18T22:00:00.000+00:00" or
> "2018-09-18T22:00:00.000Z".
> should there be a fallback like in version 2.2.4? This is still present in
> version 2.4.0.
> I also noticed
> org.apache.sling.jcr.contentloader.internal.readers.JsonReader(2.2.6) doesnt
> accept "2018-09-18T22:00:00.000Z" as a date string. Should the regex in
> org.apache.sling.jcr.contentloader.internal.readers.JsonReader be adapted to
> also allow strings like "2018-09-18T22:00:00.000Z"? The regex is still the
> same in version 2.4.0.
> Should the logging be improved?
--
This message was sent by Atlassian Jira
(v8.3.4#803005)