Re: [jackson-user] Jackson 2.13.0-rc2 released; more time for testing the Release Candidate, fix bugs

2021-09-16 Thread Nakamura
PJ did a great job of fixing the bug
, 2.13.0 is
good to go as far as I'm concerned.  Thanks again PJ!

On Tue, Sep 14, 2021 at 6:48 PM Nakamura  wrote:

> OK, I did some more research.  Two updates:
>
> 1.  Filed an issue
>  about the
> malformed class name
> 2.  I looked into the JsonNode thing.  Basically we were creating an empty
> ArrayNode, and calling ArrayNode#add(Short).  Previously, this inserted an
> IntNode, but now it inserts a ShortNode.  This seems like a bugfix, so I
> don't think we need to take any action.
>
> The scala bug is the only thing that I think would prevent us from
> upgrading right now, but I'll try to confirm in the next couple of hours.
>
> On Sat, Sep 4, 2021 at 4:27 PM Tatu Saloranta  wrote:
>
>> On Fri, Sep 3, 2021 at 12:56 PM Nakamura 
>> wrote:
>> >
>> > OK, I haven't finished working through the issues yet.  I'm trying to
>> upgrade from 2.11.4 to 2.13.0-rc2.  After fixing some expected breaking
>> changes, here are a few I found:
>>
>> First of all, thank you for going through testing, reporting issues!
>>
>> >
>> > 1. We have tests that compare the values of JsonNodes.  After the
>> upgrade, it started failing when it said that IntNode and ShortNode are not
>> equal.  I haven't pinpointed what has changed (whether it's equality, or
>> how things are turned into ShortNode or IntNode). I'll update the thread
>> once I've figured it out.
>>
>> Interesting. I do not have a good idea here; although I do know that
>> the comparison across different node types and esp. for Numeric types
>> is challenging in general.
>> This is one reason why external comparator approach with JsonNode method:
>>
>> public boolean equals(Comparator comparator, JsonNode
>> other) {
>>
>> is strongly recommended; plain `equals()` is notoriously difficult to
>> make work reliably (has to work "both ways" across different types
>> etc).
>>
>> Having said that, IntNode.equals() and ShortNode.equals() appear
>> unchanged between 2.11 and 2.13; and both would fail comparison
>> (they assume strict type equality).
>> So the issue is probably more with construction of ShortNode vs
>> IntNode for some input...
>>
>> >
>> > 2.  We have a test that tries to read all of the resources files.  When
>> it comes across jackson, it says "File Not Found".
>> > > /
>> repo1.maven.org/com/fasterxml/jackson/core/jackson-databind/2.13.0-rc2/jackson-databind-2.13.0-rc2.jar!/META-INF/versions/11
>> (No such file or directory)
>>
>> That is a weird one for sure.
>>
>> The location of `module-info.class` did move from main-level (in 2.11
>> and 2.12) to under `META-INF/versions/11`: this to prevent issues with
>> some older Java 8
>> clients. But no idea how this could cause other issues.
>>
>> > 3.  I'm getting a Malformed class name exception from the
>> jackson-scala-module.
>> >
>> >  java.lang.InternalError: Malformed class name
>> >   at java.lang.Class.getSimpleName(Class.java:1330)
>> >   at
>> java.lang.Class.getCanonicalName(Class.java:1399)
>> >   at
>> com.fasterxml.jackson.module.scala.util.TastyUtil$.hasTastyFile(TastyUtil.scala:10)
>> >   at
>> com.fasterxml.jackson.module.scala.util.ClassW.extendsScalaClass(Classes.scala:12)
>> >   at
>> com.fasterxml.jackson.module.scala.util.ClassW.extendsScalaClass$(Classes.scala:9)
>> >   at
>> com.fasterxml.jackson.module.scala.util.ClassW$$anon$1.extendsScalaClass(Classes.scala:34)
>> >   at
>> com.fasterxml.jackson.module.scala.introspect.ScalaAnnotationIntrospector$._descriptorFor(ScalaAnnotationIntrospectorModule.scala:157)
>> >   at
>> com.fasterxml.jackson.module.scala.introspect.ScalaAnnotationIntrospector$.fieldName(ScalaAnnotationIntrospectorModule.scala:173)
>> >   at
>> com.fasterxml.jackson.module.scala.introspect.ScalaAnnotationIntrospector$.findImplicitPropertyName(ScalaAnnotationIntrospectorModule.scala:46)
>> >   at
>> com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.findImplicitPropertyName(AnnotationIntrospectorPair.java:502)
>> >   at
>> com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addFields(POJOPropertiesCollector.java:530)
>> >   at
>> com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collectAll(POJOPropertiesCollector.java:421)
>> >   at
>> com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getPropertyMap(POJOPropertiesCollector.java:386)
>> >   at
>> com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.getProperties(POJOPropertiesCollector.java:233)
>> >   at
>> com.fasterxml.jackson.databind.introspect.BasicBeanDe

Re: [jackson-user] Jackson 2.13.0-rc2 released; more time for testing the Release Candidate, fix bugs

2021-09-16 Thread Tatu Saloranta
Excellent! Thank you for reporting these issues and working with us on
resolving them.

And PJ has done a really good job with the Scala module, as usual. Now it's
just me who has to get 2.13.0 out before September ends... :)

-+ Tatu +-

On Thu, Sep 16, 2021 at 2:27 PM Nakamura  wrote:

> PJ did a great job of fixing the bug
> , 2.13.0 is
> good to go as far as I'm concerned.  Thanks again PJ!
>
> On Tue, Sep 14, 2021 at 6:48 PM Nakamura  wrote:
>
>> OK, I did some more research.  Two updates:
>>
>> 1.  Filed an issue
>>  about the
>> malformed class name
>> 2.  I looked into the JsonNode thing.  Basically we were creating an
>> empty ArrayNode, and calling ArrayNode#add(Short).  Previously, this
>> inserted an IntNode, but now it inserts a ShortNode.  This seems like a
>> bugfix, so I don't think we need to take any action.
>>
>> The scala bug is the only thing that I think would prevent us from
>> upgrading right now, but I'll try to confirm in the next couple of hours.
>>
>> On Sat, Sep 4, 2021 at 4:27 PM Tatu Saloranta  wrote:
>>
>>> On Fri, Sep 3, 2021 at 12:56 PM Nakamura 
>>> wrote:
>>> >
>>> > OK, I haven't finished working through the issues yet.  I'm trying to
>>> upgrade from 2.11.4 to 2.13.0-rc2.  After fixing some expected breaking
>>> changes, here are a few I found:
>>>
>>> First of all, thank you for going through testing, reporting issues!
>>>
>>> >
>>> > 1. We have tests that compare the values of JsonNodes.  After the
>>> upgrade, it started failing when it said that IntNode and ShortNode are not
>>> equal.  I haven't pinpointed what has changed (whether it's equality, or
>>> how things are turned into ShortNode or IntNode). I'll update the thread
>>> once I've figured it out.
>>>
>>> Interesting. I do not have a good idea here; although I do know that
>>> the comparison across different node types and esp. for Numeric types
>>> is challenging in general.
>>> This is one reason why external comparator approach with JsonNode method:
>>>
>>> public boolean equals(Comparator comparator, JsonNode
>>> other) {
>>>
>>> is strongly recommended; plain `equals()` is notoriously difficult to
>>> make work reliably (has to work "both ways" across different types
>>> etc).
>>>
>>> Having said that, IntNode.equals() and ShortNode.equals() appear
>>> unchanged between 2.11 and 2.13; and both would fail comparison
>>> (they assume strict type equality).
>>> So the issue is probably more with construction of ShortNode vs
>>> IntNode for some input...
>>>
>>> >
>>> > 2.  We have a test that tries to read all of the resources files.
>>> When it comes across jackson, it says "File Not Found".
>>> > > /
>>> repo1.maven.org/com/fasterxml/jackson/core/jackson-databind/2.13.0-rc2/jackson-databind-2.13.0-rc2.jar!/META-INF/versions/11
>>> (No such file or directory)
>>>
>>> That is a weird one for sure.
>>>
>>> The location of `module-info.class` did move from main-level (in 2.11
>>> and 2.12) to under `META-INF/versions/11`: this to prevent issues with
>>> some older Java 8
>>> clients. But no idea how this could cause other issues.
>>>
>>> > 3.  I'm getting a Malformed class name exception from the
>>> jackson-scala-module.
>>> >
>>> >  java.lang.InternalError: Malformed class name
>>> >   at java.lang.Class.getSimpleName(Class.java:1330)
>>> >   at
>>> java.lang.Class.getCanonicalName(Class.java:1399)
>>> >   at
>>> com.fasterxml.jackson.module.scala.util.TastyUtil$.hasTastyFile(TastyUtil.scala:10)
>>> >   at
>>> com.fasterxml.jackson.module.scala.util.ClassW.extendsScalaClass(Classes.scala:12)
>>> >   at
>>> com.fasterxml.jackson.module.scala.util.ClassW.extendsScalaClass$(Classes.scala:9)
>>> >   at
>>> com.fasterxml.jackson.module.scala.util.ClassW$$anon$1.extendsScalaClass(Classes.scala:34)
>>> >   at
>>> com.fasterxml.jackson.module.scala.introspect.ScalaAnnotationIntrospector$._descriptorFor(ScalaAnnotationIntrospectorModule.scala:157)
>>> >   at
>>> com.fasterxml.jackson.module.scala.introspect.ScalaAnnotationIntrospector$.fieldName(ScalaAnnotationIntrospectorModule.scala:173)
>>> >   at
>>> com.fasterxml.jackson.module.scala.introspect.ScalaAnnotationIntrospector$.findImplicitPropertyName(ScalaAnnotationIntrospectorModule.scala:46)
>>> >   at
>>> com.fasterxml.jackson.databind.introspect.AnnotationIntrospectorPair.findImplicitPropertyName(AnnotationIntrospectorPair.java:502)
>>> >   at
>>> com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector._addFields(POJOPropertiesCollector.java:530)
>>> >   at
>>> com.fasterxml.jackson.databind.introspect.POJOPropertiesCollector.collectAll(POJOPropertiesCollector.jav