(regression) Factory method generic type resolution does not use Class-bound type parameter
See original GitHub issueDescribe the bug We’re currently using Jackson 2.11.2, updating to the latest version has broken several tests. After some investigation, we discovered that the bug was introduced in version 2.11.3, as the reproduction test shows.
The bug is somewhat related to static factory methods (stamp
method in the example) – the same does not happen to constructor methods.
Version information Introduced in 2.11.3
To Reproduce https://github.com/FasterXML/jackson-databind/pull/3221
Expected behavior No error
Additional context Add any other context about the problem here.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:10
- Comments:17 (17 by maintainers)
Top Results From Across the Web
Why in Swift generics factory method does compiler warn ...
The problem is that the call return DataSourceTypeA(target: self). is resolved at compile time, therefore it does not help to check
Read more >Security update for jackson-databind, jackson-dataformats ...
... + (regression) Factory method generic type resolution does not use Class-bound type parameter + Deserialization of "empty" subtype with ...
Read more >Restrictions on Generics (The Java™ Tutorials > Learning the ...
Because the Java compiler erases all type parameters in generic code, you cannot verify which parameterized type for a generic type is being...
Read more >Generics - mypy 0.991 documentation
This section explains how you can define your own generic classes that take one or more type parameters, similar to built-in types such...
Read more >Documentation - Generics - TypeScript
Types which take parameters. ... While using any is certainly generic in that it will cause the function to accept any and all...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@marcospassos This is literally on top of my to-evaluate list (https://github.com/FasterXML/jackson-future-ideas/wiki/Jackson-Work-in-Progress) so I hope to look into it tonight or tomorrow.
@marcospassos I’ll have to see – maybe I can figure it out by the next weekend.