Skip to content

"Duplicate property" issue should mention which class it complains about #1999

@OndraZizka

Description

@OndraZizka

When Jackson 2.9.5 complains about "duplicate property", it does give no reference to the specific class.
If you have hundreds of generated models, it's quite tedious to find out.

com.fasterxml.jackson.databind.exc.InvalidDefinitionException: 
Duplicate creator property "id" (index 0 vs 1)
 at [Source: (String)"{
  "description": "patched description"}"; line: 1, column: 1]
        at com.fasterxml.jackson.databind.exc.InvalidDefinitionExc

I assume it happens with other errors too, at least I found in forums: "Could not find creator property with name 'id'" and some more.

Btw, it started with version 2.9.2 - it did not complain before (I assume that was a bug).

Source:
https://github.com/FasterXML/jackson-databind/blob/f42b0dcf247b3abeab77a785548a4e7e6500909b/src/main/java/com/fasterxml/jackson/databind/deser/impl/CreatorCollector.java

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions