This is an automated email from the ASF dual-hosted git repository.

mbenson pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bval.git


The following commit(s) were added to refs/heads/master by this push:
     new e6609f7  BVAL-171: permit ConstraintValidator impl with compatible 
annotation type parameter
e6609f7 is described below

commit e6609f749af49ea2e554e8f65a5c1bf6d384ad90
Author: Matt Benson <[email protected]>
AuthorDate: Tue Feb 26 13:17:37 2019 -0600

    BVAL-171: permit ConstraintValidator impl with compatible annotation type 
parameter
---
 .../java/org/apache/bval/jsr/metadata/ValidatorMappingProvider.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/ValidatorMappingProvider.java
 
b/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/ValidatorMappingProvider.java
index e5c7d07..e06e30e 100644
--- 
a/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/ValidatorMappingProvider.java
+++ 
b/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/ValidatorMappingProvider.java
@@ -38,9 +38,9 @@ public abstract class ValidatorMappingProvider {
                 final Type constraintParameter = TypeUtils.getTypeArguments(t, 
ConstraintValidator.class)
                     .get(ConstraintValidator.class.getTypeParameters()[0]);
 
-                if (!constraintType.equals(constraintParameter)) {
+                if (!TypeUtils.isAssignable(constraintType, 
constraintParameter)) {
                     Exceptions.raise(ConstraintDefinitionException::new,
-                        "%s %s expected first type parameter of %s, %s; source 
%s", ConstraintValidator.class, t,
+                        "%s %s expected first type parameter assignable from 
%s, %s; source %s", ConstraintValidator.class, t,
                         constraintType, constraintParameter, 
result.get().getSource());
                 }
             }

Reply via email to