Skip to content

Copy operation fails with NPE on 0.8.15 #470

Closed

Description

@kringol

How to reproduce:

new ObjectMapper(new MessagePackFactory()).copy();

or just

new MessagePackFactory().copy();

Causes:

java.lang.NullPointerException
	at org.msgpack.jackson.dataformat.ExtensionTypeCustomDeserializers.<init>(ExtensionTypeCustomDeserializers.java:38)
	at org.msgpack.jackson.dataformat.MessagePackFactory.<init>(MessagePackFactory.java:61)
	at org.msgpack.jackson.dataformat.MessagePackFactory.copy(MessagePackFactory.java:147)
	at com.fasterxml.jackson.databind.ObjectMapper.<init>(ObjectMapper.java:499)
	at com.fasterxml.jackson.databind.ObjectMapper.copy(ObjectMapper.java:617)

Activity

  1. komamitsu commented on Apr 14, 2018

    @komamitsu
    Member

    Ah, the test I wrote checked only the case that MessagePackFactory has ExtensionTypeCustomDeserializers...
    https://github.com/msgpack/msgpack-java/blob/develop/msgpack-jackson/src/test/java/org/msgpack/jackson/dataformat/MessagePackFactoryTest.java#L69-L79

    This can be a workaround. But anyway I'll fix it soon.

    ObjectMapper copy = new ObjectMapper(new MessagePackFactory()
                             .setExtTypeCustomDesers(new ExtensionTypeCustomDeserializers())).copy();
    

    Thanks.

  2. komamitsu commented on Apr 15, 2018

    @komamitsu
    Member

    @kringol @mrniko Released the fix with 0.8.16.

  3. kringol commented on Apr 16, 2018

    @kringol
    Author

    Awesome, thanks @komamitsu
    That was quick :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions