|
For the following interface and class the CDI portable extension doesn't trigger method validation upon invocation of the reverse() method:
public interface Repeater<T> {
@NotNull
Object reverse(T in);
}
public class DefaultRepeater implements Repeater<String> {
@Override
public String reverse(String in) {
return null;
}
}
The cause seems to be that in ValidationExtension#determineConstrainedMethod() we pass the overridden method from the super-type together with the bean descriptor from the sub-type to isNonGetterConstrained(). As the method signature has a different parameter type in the sub-type (String instead of Object) the meta-data look-up fails and the method is not considered constrained.
|