NPE upon upgrade from HV 5.x to 6.0.8

Description

When a DTO with the following field is passed to a JAX-RS API, and HV is invoked to perform validation on the DTO.

The follow NPE is thrown:

In CascadingMetaDataBuilder.addCascadingMetaData() the enclosingType is ObjectNode and the referenceType is java.lang.Iterable

It seems TypeVariableBindings.getTypeVariableBindings( enclosingType ) is returning a Map that does not contain a binding for Iterable and thus we get the NPE because the code at CascadingMetaDataBuilder.java:395 assumes that the referenceType will always produce a result from the typeVariableBindings map.

At the moment I do not have a workaround - I cannot remove the `@Valid` annotation from this field in the DTO as it is auto generated from a swagger template. And swagger doesn't support the fine grained control I would need to exclude this particular field from being annotated with @Valid.

Environment

Spring Boot 2.0.0
JDK 8
Jersey 2.26
HV 6.0.8
Jackson 2.9.4

Status

Assignee

Guillaume Smet

Reporter

Aaron Whiteside

Labels

None

Worked in

None

Feedback Requested

None

Feedback Requested By

None

backPortable

None

Community Help Wanted

None

Suitable for new contributors

None

Requires Release Note

None

backportDecision

None

backportReEvaluate

None

Components

Fix versions

Affects versions

Priority

Major
Configure