You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Julian Sedding <js...@gmail.com> on 2019/07/02 10:01:08 UTC

[DISCUSS] Support ZonedDateTime in ValueMap

Hi all

I think it might make sense to support getting dates from ValueMaps as
java.time.ZonedDateTime instances directly. I've been finding myself
converting Calendar instances after retrieving them from ValueMaps
quite a bit lately.

WDYT?

Regards
Julian

Re: [DISCUSS] Support ZonedDateTime in ValueMap

Posted by Julian Sedding <js...@gmail.com>.
Thanks Jason. I've updated to Sling parent 34 now instead of
explicitly setting the minimum Java version to 8. While I would be
interested in updating it to sling-bundle-parent 35, I currently don't
have the spare cycles to properly test the bundle metadata after the
change.

Regards
Julian

On Fri, Jul 5, 2019 at 5:01 PM Jason E Bailey <ja...@24601.org> wrote:
>
> The parent POM was updated to Java a while back, my understanding is if you need to update a bundle to 8 as part of a story, there's no need for a separate story.
>
> --
> Jason
>
> On Fri, Jul 5, 2019, at 10:39 AM, Julian Sedding wrote:
> > Hi all
> >
> > I've implemented these changes, but I had to increase the required
> > java version of JCR Resource to Java 8 (given ZonedDateTime was
> > introduced in Java 8).
> >
> > Is that ok? Should I create a separate ticket for the Java version
> > increase? And should I increase the bundle version as well, since its
> > compatibility changes?
> >
> > Regards
> > Julian
> >
> >
> > On Thu, Jul 4, 2019 at 6:18 PM Julian Sedding <js...@gmail.com> wrote:
> > >
> > > That should have read:
> > >
> > > 've created SLING-8558 for tracking the change in ValueMapDecorator
> > > (API) and SLING-8559 for tracking the change in JcrValueMap (JCR
> > > Resource) for now.
> > >
> > > Regards
> > > Julian
> > >
> > > On Thu, Jul 4, 2019 at 12:09 PM Julian Sedding <js...@gmail.com> wrote:
> > > >
> > > > Thanks Robert.
> > > >
> > > > I've created SLING-8558 for tracking the change in ValueMapDecorator
> > > > (API) and JcrValueMap (JCR Resource) for now.
> > > >
> > > > Regards
> > > > Julian
> > > >
> > > > On Tue, Jul 2, 2019 at 12:05 PM Robert Munteanu <ro...@apache.org> wrote:
> > > > >
> > > > > On Tue, 2019-07-02 at 12:01 +0200, Julian Sedding wrote:
> > > > > > Hi all
> > > > > >
> > > > > > I think it might make sense to support getting dates from ValueMaps
> > > > > > as
> > > > > > java.time.ZonedDateTime instances directly. I've been finding myself
> > > > > > converting Calendar instances after retrieving them from ValueMaps
> > > > > > quite a bit lately.
> > > > >
> > > > > Sounds good to me. Some notes:
> > > > >
> > > > > - calendar instances also have time zones attached, so we don't
> > > > > introduce anything suprising by returning dates with time zones
> > > > > attached.
> > > > > - we don't bump up the required JVM version as ZonedDateTime is
> > > > > available with Java >= 8.
> > > > >
> > > > > Robert
> > > > >
> >

Re: [DISCUSS] Support ZonedDateTime in ValueMap

Posted by Jason E Bailey <ja...@24601.org>.
The parent POM was updated to Java a while back, my understanding is if you need to update a bundle to 8 as part of a story, there's no need for a separate story.

--
Jason

On Fri, Jul 5, 2019, at 10:39 AM, Julian Sedding wrote:
> Hi all
> 
> I've implemented these changes, but I had to increase the required
> java version of JCR Resource to Java 8 (given ZonedDateTime was
> introduced in Java 8).
> 
> Is that ok? Should I create a separate ticket for the Java version
> increase? And should I increase the bundle version as well, since its
> compatibility changes?
> 
> Regards
> Julian
> 
> 
> On Thu, Jul 4, 2019 at 6:18 PM Julian Sedding <js...@gmail.com> wrote:
> >
> > That should have read:
> >
> > 've created SLING-8558 for tracking the change in ValueMapDecorator
> > (API) and SLING-8559 for tracking the change in JcrValueMap (JCR
> > Resource) for now.
> >
> > Regards
> > Julian
> >
> > On Thu, Jul 4, 2019 at 12:09 PM Julian Sedding <js...@gmail.com> wrote:
> > >
> > > Thanks Robert.
> > >
> > > I've created SLING-8558 for tracking the change in ValueMapDecorator
> > > (API) and JcrValueMap (JCR Resource) for now.
> > >
> > > Regards
> > > Julian
> > >
> > > On Tue, Jul 2, 2019 at 12:05 PM Robert Munteanu <ro...@apache.org> wrote:
> > > >
> > > > On Tue, 2019-07-02 at 12:01 +0200, Julian Sedding wrote:
> > > > > Hi all
> > > > >
> > > > > I think it might make sense to support getting dates from ValueMaps
> > > > > as
> > > > > java.time.ZonedDateTime instances directly. I've been finding myself
> > > > > converting Calendar instances after retrieving them from ValueMaps
> > > > > quite a bit lately.
> > > >
> > > > Sounds good to me. Some notes:
> > > >
> > > > - calendar instances also have time zones attached, so we don't
> > > > introduce anything suprising by returning dates with time zones
> > > > attached.
> > > > - we don't bump up the required JVM version as ZonedDateTime is
> > > > available with Java >= 8.
> > > >
> > > > Robert
> > > >
>

Re: [DISCUSS] Support ZonedDateTime in ValueMap

Posted by Julian Sedding <js...@gmail.com>.
Hi all

I've implemented these changes, but I had to increase the required
java version of JCR Resource to Java 8 (given ZonedDateTime was
introduced in Java 8).

Is that ok? Should I create a separate ticket for the Java version
increase? And should I increase the bundle version as well, since its
compatibility changes?

Regards
Julian


On Thu, Jul 4, 2019 at 6:18 PM Julian Sedding <js...@gmail.com> wrote:
>
> That should have read:
>
> 've created SLING-8558 for tracking the change in ValueMapDecorator
> (API) and SLING-8559 for tracking the change in JcrValueMap (JCR
> Resource) for now.
>
> Regards
> Julian
>
> On Thu, Jul 4, 2019 at 12:09 PM Julian Sedding <js...@gmail.com> wrote:
> >
> > Thanks Robert.
> >
> > I've created SLING-8558 for tracking the change in ValueMapDecorator
> > (API) and JcrValueMap (JCR Resource) for now.
> >
> > Regards
> > Julian
> >
> > On Tue, Jul 2, 2019 at 12:05 PM Robert Munteanu <ro...@apache.org> wrote:
> > >
> > > On Tue, 2019-07-02 at 12:01 +0200, Julian Sedding wrote:
> > > > Hi all
> > > >
> > > > I think it might make sense to support getting dates from ValueMaps
> > > > as
> > > > java.time.ZonedDateTime instances directly. I've been finding myself
> > > > converting Calendar instances after retrieving them from ValueMaps
> > > > quite a bit lately.
> > >
> > > Sounds good to me. Some notes:
> > >
> > > - calendar instances also have time zones attached, so we don't
> > > introduce anything suprising by returning dates with time zones
> > > attached.
> > > - we don't bump up the required JVM version as ZonedDateTime is
> > > available with Java >= 8.
> > >
> > > Robert
> > >

Re: [DISCUSS] Support ZonedDateTime in ValueMap

Posted by Julian Sedding <js...@gmail.com>.
That should have read:

've created SLING-8558 for tracking the change in ValueMapDecorator
(API) and SLING-8559 for tracking the change in JcrValueMap (JCR
Resource) for now.

Regards
Julian

On Thu, Jul 4, 2019 at 12:09 PM Julian Sedding <js...@gmail.com> wrote:
>
> Thanks Robert.
>
> I've created SLING-8558 for tracking the change in ValueMapDecorator
> (API) and JcrValueMap (JCR Resource) for now.
>
> Regards
> Julian
>
> On Tue, Jul 2, 2019 at 12:05 PM Robert Munteanu <ro...@apache.org> wrote:
> >
> > On Tue, 2019-07-02 at 12:01 +0200, Julian Sedding wrote:
> > > Hi all
> > >
> > > I think it might make sense to support getting dates from ValueMaps
> > > as
> > > java.time.ZonedDateTime instances directly. I've been finding myself
> > > converting Calendar instances after retrieving them from ValueMaps
> > > quite a bit lately.
> >
> > Sounds good to me. Some notes:
> >
> > - calendar instances also have time zones attached, so we don't
> > introduce anything suprising by returning dates with time zones
> > attached.
> > - we don't bump up the required JVM version as ZonedDateTime is
> > available with Java >= 8.
> >
> > Robert
> >

Re: [DISCUSS] Support ZonedDateTime in ValueMap

Posted by Julian Sedding <js...@gmail.com>.
Thanks Robert.

I've created SLING-8558 for tracking the change in ValueMapDecorator
(API) and JcrValueMap (JCR Resource) for now.

Regards
Julian

On Tue, Jul 2, 2019 at 12:05 PM Robert Munteanu <ro...@apache.org> wrote:
>
> On Tue, 2019-07-02 at 12:01 +0200, Julian Sedding wrote:
> > Hi all
> >
> > I think it might make sense to support getting dates from ValueMaps
> > as
> > java.time.ZonedDateTime instances directly. I've been finding myself
> > converting Calendar instances after retrieving them from ValueMaps
> > quite a bit lately.
>
> Sounds good to me. Some notes:
>
> - calendar instances also have time zones attached, so we don't
> introduce anything suprising by returning dates with time zones
> attached.
> - we don't bump up the required JVM version as ZonedDateTime is
> available with Java >= 8.
>
> Robert
>

Re: [DISCUSS] Support ZonedDateTime in ValueMap

Posted by Robert Munteanu <ro...@apache.org>.
On Tue, 2019-07-02 at 12:01 +0200, Julian Sedding wrote:
> Hi all
> 
> I think it might make sense to support getting dates from ValueMaps
> as
> java.time.ZonedDateTime instances directly. I've been finding myself
> converting Calendar instances after retrieving them from ValueMaps
> quite a bit lately.

Sounds good to me. Some notes:

- calendar instances also have time zones attached, so we don't
introduce anything suprising by returning dates with time zones
attached.
- we don't bump up the required JVM version as ZonedDateTime is
available with Java >= 8.

Robert