Repository: bval
Updated Branches:
  refs/heads/bv2 46e801984 -> 47e3820bd


moving to OWB 2


Project: http://git-wip-us.apache.org/repos/asf/bval/repo
Commit: http://git-wip-us.apache.org/repos/asf/bval/commit/47e3820b
Tree: http://git-wip-us.apache.org/repos/asf/bval/tree/47e3820b
Diff: http://git-wip-us.apache.org/repos/asf/bval/diff/47e3820b

Branch: refs/heads/bv2
Commit: 47e3820bd1e3b2a435ed38848c13c258b3bd7d23
Parents: 46e8019
Author: Romain Manni-Bucau <rmannibu...@gmail.com>
Authored: Thu Feb 22 18:27:45 2018 +0100
Committer: Romain Manni-Bucau <rmannibu...@gmail.com>
Committed: Thu Feb 22 18:28:02 2018 +0100

----------------------------------------------------------------------
 bval-jsr/pom.xml                                             | 8 ++++----
 .../src/main/java/org/apache/bval/cdi/BValExtension.java     | 6 ++++--
 .../src/main/java/org/apache/bval/jsr/descriptor/BeanD.java  | 4 +++-
 .../java/org/apache/bval/jsr/metadata/ReflectionBuilder.java | 4 ++--
 .../src/test/java/org/apache/bval/jsr/util/TestUtils.java    | 1 +
 bval-tck11/pom.xml                                           | 8 ++++----
 bval-tck11/work-tests-suite.xml                              | 4 ++--
 pom.xml                                                      | 4 ++--
 8 files changed, 22 insertions(+), 17 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bval/blob/47e3820b/bval-jsr/pom.xml
----------------------------------------------------------------------
diff --git a/bval-jsr/pom.xml b/bval-jsr/pom.xml
index 561d2d4..f95f794 100644
--- a/bval-jsr/pom.xml
+++ b/bval-jsr/pom.xml
@@ -186,8 +186,8 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jcdi_1.1_spec</artifactId>
-            <version>1.0-alpha-1</version>
+            <artifactId>geronimo-jcdi_2.0_spec</artifactId>
+            <version>1.0</version>
             <scope>provided</scope>
             <optional>true</optional>
         </dependency>
@@ -198,8 +198,8 @@
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.2_spec</artifactId>
-            <version>1.0-alpha-1</version>
+            <artifactId>geronimo-annotation_1.3_spec</artifactId>
+            <version>1.0</version>
             <scope>provided</scope>
             <optional>true</optional>
         </dependency>

http://git-wip-us.apache.org/repos/asf/bval/blob/47e3820b/bval-jsr/src/main/java/org/apache/bval/cdi/BValExtension.java
----------------------------------------------------------------------
diff --git a/bval-jsr/src/main/java/org/apache/bval/cdi/BValExtension.java 
b/bval-jsr/src/main/java/org/apache/bval/cdi/BValExtension.java
index e10a9ba..75bf195 100644
--- a/bval-jsr/src/main/java/org/apache/bval/cdi/BValExtension.java
+++ b/bval-jsr/src/main/java/org/apache/bval/cdi/BValExtension.java
@@ -241,8 +241,10 @@ public class BValExtension implements Extension {
                 if (validatorFactoryFound) {
                     factory = config.buildValidatorFactory();
                 } // else fresh factory already created in previous if
-                afterBeanDiscovery.addBean(new ValidatorBean(factory, 
factory.getValidator()));
-                validatorFound = true;
+                if (factory != null) { // happens in TCKS
+                    afterBeanDiscovery.addBean(new ValidatorBean(factory, 
factory.getValidator()));
+                    validatorFound = true;
+                }
             } catch (final Exception e) { // getValidator can throw an 
exception with custom providers
                 afterBeanDiscovery.addBean(new ValidatorBean(factory, null));
                 validatorFound = true;

http://git-wip-us.apache.org/repos/asf/bval/blob/47e3820b/bval-jsr/src/main/java/org/apache/bval/jsr/descriptor/BeanD.java
----------------------------------------------------------------------
diff --git a/bval-jsr/src/main/java/org/apache/bval/jsr/descriptor/BeanD.java 
b/bval-jsr/src/main/java/org/apache/bval/jsr/descriptor/BeanD.java
index 7f52c6d..44a641a 100644
--- a/bval-jsr/src/main/java/org/apache/bval/jsr/descriptor/BeanD.java
+++ b/bval-jsr/src/main/java/org/apache/bval/jsr/descriptor/BeanD.java
@@ -85,7 +85,9 @@ public class BeanD extends ElementD<Class<?>, 
MetadataReader.ForBean> implements
 
     @Override
     public MethodDescriptor getConstraintsForMethod(String methodName, 
Class<?>... parameterTypes) {
-        return methods.get().get(new Signature(methodName, parameterTypes));
+        final Map<Signature, MethodD> methods = this.methods.get();
+        final Signature key = new Signature(methodName, parameterTypes);
+        return methods.get(key);
     }
 
     @SuppressWarnings("unlikely-arg-type")

http://git-wip-us.apache.org/repos/asf/bval/blob/47e3820b/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/ReflectionBuilder.java
----------------------------------------------------------------------
diff --git 
a/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/ReflectionBuilder.java 
b/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/ReflectionBuilder.java
index 776012d..12f62da 100644
--- a/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/ReflectionBuilder.java
+++ b/bval-jsr/src/main/java/org/apache/bval/jsr/metadata/ReflectionBuilder.java
@@ -35,7 +35,6 @@ import java.util.Optional;
 import java.util.Set;
 import java.util.TreeMap;
 import java.util.function.Function;
-import java.util.function.Predicate;
 import java.util.stream.Collectors;
 import java.util.stream.IntStream;
 import java.util.stream.Stream;
@@ -110,7 +109,8 @@ public class ReflectionBuilder {
             if (declaredMethods.length == 0) {
                 return Collections.emptyMap();
             }
-            return Stream.of(declaredMethods).filter(((Predicate<Method>) 
Methods::isGetter).negate()).collect(
+            // we can't filter the getters since they can be validated, todo: 
read the config to know if we need or not
+            return Stream.of(declaredMethods).collect(
                 Collectors.toMap(Signature::of, m -> new 
ReflectionBuilder.ForExecutable<>(new Metas.ForMethod(m),
                     
validatorFactory.getParameterNameProvider()::getParameterNames)));
         }

http://git-wip-us.apache.org/repos/asf/bval/blob/47e3820b/bval-jsr/src/test/java/org/apache/bval/jsr/util/TestUtils.java
----------------------------------------------------------------------
diff --git a/bval-jsr/src/test/java/org/apache/bval/jsr/util/TestUtils.java 
b/bval-jsr/src/test/java/org/apache/bval/jsr/util/TestUtils.java
index a121b54..880cbb5 100644
--- a/bval-jsr/src/test/java/org/apache/bval/jsr/util/TestUtils.java
+++ b/bval-jsr/src/test/java/org/apache/bval/jsr/util/TestUtils.java
@@ -26,6 +26,7 @@ import java.lang.annotation.Annotation;
 import java.util.Collection;
 import java.util.Set;
 
+import javax.enterprise.inject.Vetoed;
 import javax.validation.ConstraintViolation;
 import javax.validation.metadata.ConstraintDescriptor;
 import javax.validation.metadata.ElementDescriptor.ConstraintFinder;

http://git-wip-us.apache.org/repos/asf/bval/blob/47e3820b/bval-tck11/pom.xml
----------------------------------------------------------------------
diff --git a/bval-tck11/pom.xml b/bval-tck11/pom.xml
index e4758c1..9a4a805 100644
--- a/bval-tck11/pom.xml
+++ b/bval-tck11/pom.xml
@@ -32,7 +32,7 @@ under the License.
 
     <properties>
         <tck.version>1.1.4.Final</tck.version>
-        <owb.version>1.7.2</owb.version>
+        <owb.version>2.0.4</owb.version>
         <arquillian.version>1.1.13.Final</arquillian.version>
         
<validation.provider>org.apache.bval.jsr.ApacheValidationProvider</validation.provider>
     </properties>
@@ -51,13 +51,13 @@ under the License.
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-jcdi_1.1_spec</artifactId>
+            <artifactId>geronimo-jcdi_2.0_spec</artifactId>
             <version>1.0</version>
             <scope>provided</scope>
         </dependency>
         <dependency>
             <groupId>org.apache.geronimo.specs</groupId>
-            <artifactId>geronimo-annotation_1.2_spec</artifactId>
+            <artifactId>geronimo-annotation_1.3_spec</artifactId>
             <version>1.0</version>
             <scope>provided</scope>
         </dependency>
@@ -119,7 +119,7 @@ under the License.
         <dependency>
             <groupId>org.apache.tomcat</groupId>
             <artifactId>tomcat-jasper-el</artifactId>
-            <version>7.0.42</version>
+            <version>9.0.5</version>
             <scope>provided</scope>
         </dependency>
         <dependency>

http://git-wip-us.apache.org/repos/asf/bval/blob/47e3820b/bval-tck11/work-tests-suite.xml
----------------------------------------------------------------------
diff --git a/bval-tck11/work-tests-suite.xml b/bval-tck11/work-tests-suite.xml
index 6d25c5b..0157dd8 100644
--- a/bval-tck11/work-tests-suite.xml
+++ b/bval-tck11/work-tests-suite.xml
@@ -21,9 +21,9 @@ think to add 
-Dvalidation.provider=org.apache.bval.jsr303.ApacheValidationProvid
 <suite name="tmp" verbose="1">
   <test name="tmp">
     <classes>
-      <class 
name="org.hibernate.beanvalidation.tck.tests.constraints.customconstraint.CustomConstraintValidatorTest">
+      <class 
name="org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.types.ExecutableTypesTest">
         <methods>
-          <include name="testIsValidIsCalledForEachValidation"/>
+          <include 
name="testValidationOfConstrainedGetterReturnValueWithExecutableTypeGETTER_METHODS"/>
         </methods>
       </class>
     </classes>

http://git-wip-us.apache.org/repos/asf/bval/blob/47e3820b/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index 42e8d80..8cbc1d3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -301,7 +301,7 @@
             <dependency>
                 <groupId>javax.validation</groupId>
                 <artifactId>validation-api</artifactId>
-                <version>1.1.0.Final</version>
+                <version>2.0.1.Final</version>
             </dependency>
             <!-- JPA2 spec required for JPA TraversableResolver support -->
             <dependency>
@@ -366,7 +366,7 @@
             <dependency>
                 <groupId>org.apache.tomcat</groupId>
                 <artifactId>tomcat-el-api</artifactId>
-                <version>7.0.72</version>
+                <version>9.0.5</version>
                 <scope>provided</scope>
             </dependency>
             <dependency>

Reply via email to