You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by "Konrad Windszus (Jira)" <ji...@apache.org> on 2021/06/04 14:15:00 UTC

[jira] [Resolved] (JCRVLT-526) FSPackageRegistry doesn't support date format with timezone format +-hhmm

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

Konrad Windszus resolved JCRVLT-526.
------------------------------------
    Resolution: Fixed

Applied PR in [https://github.com/apache/jackrabbit-filevault/commit/2ae40f7bd6e3378d4e5a98db1d8dd447160dd205.]

[~hanspeterstoerr] Thanks a lot for the contribution.

> FSPackageRegistry doesn't support date format with timezone format +-hhmm
> -------------------------------------------------------------------------
>
>                 Key: JCRVLT-526
>                 URL: https://issues.apache.org/jira/browse/JCRVLT-526
>             Project: Jackrabbit FileVault
>          Issue Type: Bug
>         Environment: Sling-Starter 12-SNAPSHOT with JDK 11 on MacOS
>            Reporter: Hans-Peter Stoerr
>            Assignee: Konrad Windszus
>            Priority: Minor
>
> When packages e.g. a creation date with a timezone format +- hhmm or +-hh are entered into the FSPackageRegistry, the date cannot be read by org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl.getCreated() : it returns null since it internally uses org.apache.jackrabbit.util.ISO8601.parse to parse the date, which doesn't support that (compare JCR-4267). This is a problem, since com.day.jcr.vault:content-package-maven-plugin (I tried versions 0.0.12 and 0.5.4) write package properties using such a format - e.g. 2021-05-26T15:12:21.673+0200 , while org.apache.jackrabbit.util.ISO8601.parse just supports a format like 2021-05-26T15:12:21.673+02:00 . So right now one has to use unpleasant workarounds like using packageProps.getProperty(PackageProperties.NAME_CREATED) and parse that. I suggest changing PackagePropertiesImpl.getDateProperty to support this format, instead.
> (Compare also this comment , where that was discussed.)



--
This message was sent by Atlassian Jira
(v8.3.4#803005)