EnumCodec stop to work

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Duplicate
    • Priority: Critical - P2
    • None
    • Affects Version/s: 3.6.0
    • Component/s: POJO
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      It seems that the enum codec stop to work in 3.6.0

      When I use the MongoStorageTest class usin mongo-java-driver 3.5.0
      the test work fine (object is inserted)
      When I change the driver to 3.6.0 I got a nullPointerException

      java.lang.NullPointerException at org.bson.codecs.pojo.PojoCodecImpl.shouldSpecialize(PojoCodecImpl.java:337)

      After trying to debug a little bit it appear that the enum BLABLA is considered having class java.lang.class when converted to TypeWithTypeParameters so the EnumPropertyCodecProvider return null instead of an instance of EnumCodec

        1. BLABLA.java
          0.1 kB
        2. MongoStorageTest.java
          2 kB
        3. Toto.java
          0.5 kB

              Assignee:
              Unassigned
              Reporter:
              f-renout
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: