Jackson 2.11.0.rc1 released -- please help testing!

56 views
Skip to first unread message

Tatu Saloranta

unread,
Mar 25, 2020, 2:45:35 PM3/25/20
to jackson-announce, jackson-user, jacks...@googlegroups.com
As some of you may have noticed, pre-release version 2.11.0.rc1 is now out.
While it should be quite close to eventual 2.11.0, some things may
still change but my hope is that all compatibility-related changes are
in.

The main goal for doing pre-release version(s) is to have one last
chance to find issues related to backwards compatibility with previous
minor versions. While we try to keep compatibility according to
Semantic Versioning guidelines, sometimes there are accidental changes
that violate this.
So we would like to find such issues before 2.11.0 is released, and
fix issues where possible; or mitigate if they can not be; or at very
least document changes in behavior where change is actually
intentional.

Changes included are detailed here:

https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.11

including section "Changes, Behavior", which included likeliest
changes that might affect your code. For this release there are so far
3 things:

1. Default serialization ordering now considers @JsonProperty(index = )
2. Avro format backend will change schema type indicated for `byte[]`,
`java.util.UUID`
3. Timezone offset in default java.util.Date, java.util.Calendar
serialization will now include colon (like +00:00) by default (see
databind#2643 below)

But there may well be other unintended changes. We would like to hear
about unknown changes, as well as feedback on above-listed intentional
changes

At this point I hope to spend at least 2 weeks, but no more than 4
weeks before releasing 2.11.0.
All feedback on this pre-release would be welcome: including "it seems
to work fine, no problem when switching 2.10.3" as well as reports
about issues found.

Happy hacking,

-+ Tatu +-

Nakamura

unread,
Mar 26, 2020, 9:49:01 PM3/26/20
to jackso...@googlegroups.com
Hi Tatu,

Long time listener, first time caller!  My company is hoping to get a bit closer to the bleeding edge with jackson, so I figured I'd take a stab at helping you test it out.

Not sure where you want feedback, so I'm just going to reply for now.  I'm currently on 2.9.10 and trying out 2.11.0.rc1, and so far I've run into a few issues.  I'll keep poking to see if any of the others are worth surfacing, but so far we have a strange NPE:

                     java.lang.NullPointerException: null
                      at scala.collection.mutable.ArrayOps$ofRef$.length$extension(ArrayOps.scala:204)
                      at scala.collection.mutable.ArrayOps$ofRef.length(ArrayOps.scala:204)
                      at scala.collection.SeqLike.size(SeqLike.scala:108)
                      at scala.collection.SeqLike.size$(SeqLike.scala:108)
                      at scala.collection.mutable.ArrayOps$ofRef.size(ArrayOps.scala:198)
                      at scala.collection.IndexedSeqLike.sizeHintIfCheap(IndexedSeqLike.scala:99)
                      at scala.collection.IndexedSeqLike.sizeHintIfCheap$(IndexedSeqLike.scala:99)
                      at scala.collection.mutable.ArrayOps$ofRef.sizeHintIfCheap(ArrayOps.scala:198)
                      at scala.collection.mutable.Builder.sizeHint(Builder.scala:80)
                      at scala.collection.mutable.Builder.sizeHint$(Builder.scala:79)
                      at scala.collection.mutable.ArrayBuilder.sizeHint(ArrayBuilder.scala:25)
                      at scala.collection.TraversableLike.builder$1(TraversableLike.scala:234)
                      at scala.collection.TraversableLike.map(TraversableLike.scala:237)
                      at scala.collection.TraversableLike.map$(TraversableLike.scala:231)
                      at scala.collection.mutable.ArrayOps$ofRef.map(ArrayOps.scala:198)
                      at com.fasterxml.jackson.module.scala.introspect.ScalaAnnotationIntrospector$ScalaValueInstantiator.<init>(ScalaAnnotationIntrospectorModule.scala:129)
                      at com.fasterxml.jackson.module.scala.introspect.ScalaAnnotationIntrospector$.findValueInstantiator(ScalaAnnotationIntrospectorModule.scala:159)
                      at com.fasterxml.jackson.databind.deser.BasicDeserializerFactory.findValueInstantiator(BasicDeserializerFactory.java:231)
                      at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.buildBeanDeserializer(BeanDeserializerFactory.java:220)
                      at com.fasterxml.jackson.databind.deser.BeanDeserializerFactory.createBeanDeserializer(BeanDeserializerFactory.java:143)
                      at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer2(DeserializerCache.java:414)
                      at com.fasterxml.jackson.databind.deser.DeserializerCache._createDeserializer(DeserializerCache.java:349)
                      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCache2(DeserializerCache.java:264)
                      at com.fasterxml.jackson.databind.deser.DeserializerCache._createAndCacheValueDeserializer(DeserializerCache.java:244)
                      at com.fasterxml.jackson.databind.deser.DeserializerCache.findValueDeserializer(DeserializerCache.java:142)
                      at com.fasterxml.jackson.databind.DeserializationContext.findContextualValueDeserializer(DeserializationContext.java:446)
                      at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.createContextual(CollectionDeserializer.java:183)
                      at com.fasterxml.jackson.module.scala.deser.GenericFactoryDeserializerResolver$Deserializer.createContextual(GenericFactoryDeserializerResolver.scala:71)
                      at com.fasterxml.jackson.module.scala.deser.GenericFactoryDeserializerResolver$Deserializer.createContextual(GenericFactoryDeserializerResolver.scala:62)
                      at com.fasterxml.jackson.databind.DeserializationContext.handleSecondaryContextualization(DeserializationContext.java:684)
                      at com.fasterxml.jackson.databind.DeserializationContext.findRootValueDeserializer(DeserializationContext.java:484)
                      at com.fasterxml.jackson.databind.ObjectMapper._findRootDeserializer(ObjectMapper.java:4621)
                      at com.fasterxml.jackson.databind.ObjectMapper._readValue(ObjectMapper.java:4400)
                      at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:2745)

It looks like it's because of this line:


      val args = delegate.getFromObjectArguments(None.orNull)

None.orNull always returns null, so we can probably replace this with

      val args = delegate.getFromObjectArguments(null)

for no change.  I'm somewhat stumped what else might be going on here though–I don't think we ever make a custom ValueInstantiator in our codebase, so I don't know how getFromObjectArguments could end up returning null.  Do you have any idea what might be going on?  I'll try moving to 2.10.3 too and will see if this is still an issue.

Best,
Moses


--
You received this message because you are subscribed to the Google Groups "jackson-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jackson-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/CAL4a10hJLpZ4QZe%2B8A0cF%2BdvcxAhtAYD-jxQy6YxLpTBGbH%2BoA%40mail.gmail.com.

Tatu Saloranta

unread,
Mar 27, 2020, 11:30:50 AM3/27/20
to jackson-user
On Thu, Mar 26, 2020 at 6:49 PM Nakamura <nny...@gmail.com> wrote:
Hi Tatu,

Hello there!
 

Long time listener, first time caller!  My company is hoping to get a bit closer to the bleeding edge with jackson, so I figured I'd take a stab at helping you test it out.

Excellent, thank you for helping.
That does look strange.
 
It looks like it's because of this line:


      val args = delegate.getFromObjectArguments(None.orNull)

None.orNull always returns null, so we can probably replace this with

      val args = delegate.getFromObjectArguments(null)

for no change.  I'm somewhat stumped what else might be going on here though–I don't think we ever make a custom ValueInstantiator in our codebase, so I don't know how getFromObjectArguments could end up returning null.  Do you have any idea what might be going on?  I'll try moving to 2.10.3 too and will see if this is still an issue.


Could you please file an issue with same information for Scala module:


since it seems like it is triggered within that module. I can then work with Scala module owners (I do not work on that module myself) to figure out where changes/workaround is needed.

Thank you!

-+ Tatu +-

 

Nakamura

unread,
Mar 27, 2020, 5:28:22 PM3/27/20
to jackso...@googlegroups.com
Thanks, I filed a ticket here, PJ is helping me out!  One other thing I noticed was that a Map we had previously been deserializing as a null is now being deserialized as an empty Map when it's not specified in the JSON.  Is that expected?  I think it's a nicer behavior, so I'm on board, but I didn't see that in the release notes, so I wanted to make sure it wasn't a bug.

Tatu Saloranta

unread,
Mar 27, 2020, 10:31:33 PM3/27/20
to jackson-user
On Fri, Mar 27, 2020 at 2:28 PM Nakamura <nakamur...@gmail.com> wrote:
Thanks, I filed a ticket here, PJ is helping me out!  One other thing I noticed was that a Map we had previously been deserializing as a null is now being deserialized as an empty Map when it's not specified in the JSON.  Is that expected?  I think it's a nicer behavior, so I'm on board, but I didn't see that in the release notes, so I wanted to make sure it wasn't a bug.

Hmmh. I wouldn't think this should have changed by default, but there are new settings that allow specifying this behavior, see:


(under "Null replacement/error/skipping (on deserialization")

so that incoming `null` can be replaced with "empty" value for type.

I am guessing that maybe this feature is somehow enabled by Scala module, possibly to achieve something else (avoid NPEs?)

-+ Tatu +-


 

Nakamura

unread,
Mar 30, 2020, 1:52:46 PM3/30/20
to jackso...@googlegroups.com
Hi Tatu,
PJ looked into it, and thinks he has managed to fix the NPE problem.  When you get a chance, can you cut an rc2 so I can try it out?
Thanks,
Moses

Tatu Saloranta

unread,
Mar 30, 2020, 4:12:49 PM3/30/20
to jackson-user
On Mon, Mar 30, 2020 at 10:52 AM Nakamura <nakamur...@gmail.com> wrote:
Hi Tatu,
PJ looked into it, and thinks he has managed to fix the NPE problem.  When you get a chance, can you cut an rc2 so I can try it out?
Thanks,
Moses

Hi there!

Unfortunately effort to release a full set is high enough (2-4 hours of work) that I don't plan on necessary doing more release candidates.

But what I will do is to ensure that `2.11.0-SNAPSHOT` from Sonatype OSS repository has latest versions of `jackson-core`, `jackson-databind` (head of `2.11` branch will produce `2.11.0-SNAPSHOT`)
This should be the case now (I did `mvn deploy` on all 3 projects locally after syncing with 2.11).

What is needed beyond this is similar for Scala module. Maybe PJ can help with that (for me `sbt` just does not work, at least not for publishing: I am also not sure if snapshot build works similar to Maven).

You could also achieve this locally by doing `mvn install` on these libraries (except for Scala which uses `sbt` for builds); that will publish snapshot locally.

-+ Tatu +-
 

Nakamura

unread,
Mar 30, 2020, 5:21:51 PM3/30/20
to jackso...@googlegroups.com

Nakamura

unread,
Mar 30, 2020, 10:02:29 PM3/30/20
to jackso...@googlegroups.com
I was able to try out the snapshot with jackson-module-scala, and the fix seems to work!

Tatu Saloranta

unread,
Mar 30, 2020, 10:17:37 PM3/30/20
to jackson-user
On Mon, Mar 30, 2020 at 7:02 PM Nakamura <nakamur...@gmail.com> wrote:
>
> I was able to try out the snapshot with jackson-module-scala, and the fix seems to work!

Excellent! Thank you very much for reporting this & following through.
This is why I do pre-releases & how ideally process works. :)

-+ Tatu +-
> To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/CAEYWR9u11BzSwNEta10E2kDyYRL48AThVh2z%3DRNbpR6kKazNaQ%40mail.gmail.com.

Nakamura

unread,
Apr 22, 2020, 8:35:39 AM4/22/20
to jackso...@googlegroups.com
Hey Tatu,
I hope things are going well!  What's the plan re: 2.11.0?  We're seeing some drift in our repository, so I'd like to be able to move to 2.11.0 and stop maintaining my branch =).
Best,
Moses

Tatu Saloranta

unread,
Apr 22, 2020, 1:07:00 PM4/22/20
to jackson-user
On Wed, Apr 22, 2020 at 5:35 AM Nakamura <nakamur...@gmail.com> wrote:
>
> Hey Tatu,
> I hope things are going well! What's the plan re: 2.11.0? We're seeing some drift in our repository, so I'd like to be able to move to 2.11.0 and stop maintaining my branch =).

Hi there! I was actually hoping to make the release last weekend, but
there is one on-going jackson-core feature I would like to merge
first.
So if all goes well, I could make 2.11.0 over coming weekend (in 3 days or so).
So basically we should get the new minor version release quite soon.
> To view this discussion on the web visit https://groups.google.com/d/msgid/jackson-user/CAEYWR9uGsVwDk06kX63Kmei3ZSzbKgZZCBSVEi-XaKw%3DWzpSyA%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages