question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

(regression) Factory method generic type resolution does not use Class-bound type parameter

See original GitHub issue

Describe 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:closed
  • Created 2 years ago
  • Reactions:10
  • Comments:17 (17 by maintainers)

github_iconTop GitHub Comments

1reaction
cowtowncodercommented, Aug 17, 2021

@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.

0reactions
cowtowncodercommented, Aug 24, 2021

@marcospassos I’ll have to see – maybe I can figure it out by the next weekend.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found