POJO that implements a generic interface cannot be serialized

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major - P3
    • 3.6.0
    • Affects Version/s: 3.5.0
    • Component/s: POJO
    • None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      I ran into a problem with POJO classes that implement a generic interface. Basically, the getDeclaredMethods function used in PojoBuilderHelper returns signatures for both the generic property type and the actual property type and then it gets upset because it thinks there are two methods with the same name and different types. I've attached a minimal example that demonstrates this issue. Unfortunately, due to JAVA-2620, adding @BsonIgnore to the property/methods in question doesn't fix this.

              Assignee:
              Ross Lawley
              Reporter:
              Zoe Snape
              None
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: