Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE In TypeFactory. constructParametricType(...) #1725

Closed
ctytgat opened this issue Aug 4, 2017 · 1 comment
Closed

NPE In TypeFactory. constructParametricType(...) #1725

ctytgat opened this issue Aug 4, 2017 · 1 comment
Milestone

Comments

@ctytgat
Copy link

ctytgat commented Aug 4, 2017

Used version: 2.9.0

We've got some code that executes:

new ObjectMapper().getTypeFactory().constructParametricType(List.class, HashMap.class);

This throws a NPE, depending on whether or not the type info is cached. Can easily be reproduced by executing just this statement.

Exception in thread "main" java.lang.NullPointerException
	at com.fasterxml.jackson.databind.type.TypeFactory._fromVariable(TypeFactory.java:1455)
	at com.fasterxml.jackson.databind.type.TypeFactory._fromAny(TypeFactory.java:1216)
	at com.fasterxml.jackson.databind.type.TypeFactory._fromParamType(TypeFactory.java:1438)
	at com.fasterxml.jackson.databind.type.TypeFactory._fromAny(TypeFactory.java:1206)
	at com.fasterxml.jackson.databind.type.TypeFactory._resolveSuperClass(TypeFactory.java:1339)
	at com.fasterxml.jackson.databind.type.TypeFactory._fromClass(TypeFactory.java:1298)
	at com.fasterxml.jackson.databind.type.TypeFactory.constructParametricType(TypeFactory.java:931)
	at be.awv.abbamelda.eminfra.application.atomium.DomainEventFeedPageCodec.main(DomainEventFeedPageCodec.java:119)
@cowtowncoder
Copy link
Member

Thank you for reporting this.

@cowtowncoder cowtowncoder added this to the 2.9.0 milestone Aug 6, 2017
@cowtowncoder cowtowncoder changed the title NPE In TypeFactory NPE In TypeFactory. constructParametricType(...) Aug 6, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants