| So first, this paragraph was rebranded for "non-generic containers" whereas it indeed also concerns this case:
@Constraint(payload = UNWRAP)
private List<Element> property;
as the first paragraph states it. We agreed on discouraging this but it looks like this paragraph is also about it. Another point is that in the RI, we also throw an exception in this case:
private class BeanWithWrapperWithTwoTypeArguments {
@Min(value = 10, payload = { Unwrapping.Unwrap.class })
private final WrapperWithTwoTypeArguments<Long, String> wrapper = new WrapperWithTwoTypeArguments<>( 5L, "value" );
}
even if we have only one VE defined for the key and no VE defined for the value. 2 things here:
- not sure throwing an exception is the best we can do
- if we consider we should throw an exception, then we should take this case into account in the resolution algorithm
|