Skip to content

Handle MalformedParameterizedTypeException in AnnotatedConstructor.getGenericParameterTypes(idx) #418

Closed
@aantono

Description

@aantono

Currently the MalformedParameterizedTypeException is not being handled when trying to resolve the "creators" in POJOPropertiesCollector. This exception can be thrown by the JDK "Constructor" class when asking for "getGenericParameterTypes". This is typically happens if the JVM/JDK implementation does not think that the declared type can be instantiated (like having a List type [which is an interface] be declared as a constructor argument).

It seems that Jackson can handle List and Map types via other mechanisms, so maybe just ignoring those constructors that throw this exception is the best coarse of action and create the object using other (creatable) constructors or via direct field member setting.

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