Correctly handle graph navigation determinism.
[JSR 303 TCK Result] 122 of 257 (47.47%) Pass with 10 Failures and 7 Errors.
Review at http://gwt-code-reviews.appspot.com/1420812
Review by: rchandia@google.com
git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@10115 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/user/src/com/google/gwt/validation/client/impl/GwtValidationContext.java b/user/src/com/google/gwt/validation/client/impl/GwtValidationContext.java
index 3573ee9..ee68304 100644
--- a/user/src/com/google/gwt/validation/client/impl/GwtValidationContext.java
+++ b/user/src/com/google/gwt/validation/client/impl/GwtValidationContext.java
@@ -62,7 +62,7 @@
this.beanDescriptor = beanDescriptor;
this.messageInterpolator = messageInterpolator;
this.validator = validator;
- this.validatedObjects = validatedObjects;
+ this.validatedObjects = new HashSet<Object>(validatedObjects);
}
public final void addValidatedObject(Object o) {
diff --git a/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java b/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
index ef58945..703e953 100644
--- a/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
+++ b/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
@@ -1483,7 +1483,7 @@
sw.println("\");");
// TODO(nchalko) move this out of here to the Validate method
- if (p.isCascaded()) {
+ if (p.isCascaded() && hasValid(p, useField)) {
// if(value != null) {
sw.println("if(value != null) {");
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateGwtTest.java
index fe6d48b..ac99b82 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateGwtTest.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/validation/ValidateGwtTest.java
@@ -15,8 +15,6 @@
*/
package org.hibernate.jsr303.tck.tests.validation;
-import org.hibernate.jsr303.tck.util.client.Failing;
-
import javax.validation.ValidationException;
/**
@@ -34,12 +32,10 @@
delegate.testConstraintViolation();
}
- @Failing(issue = 5930)
public void testGraphValidationWithArray() {
delegate.testGraphValidationWithArray();
}
- @Failing(issue = 5930)
public void testGraphValidationWithList() {
delegate.testGraphValidationWithList();
}
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationGwtTest.java
index 026d08e..78f6003 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationGwtTest.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationGwtTest.java
@@ -48,7 +48,6 @@
delegate.testFullGraphValidationBeforeNextGroupInSequence();
}
- @Failing(issue = 5946)
public void testGraphNavigationDeterminism() {
delegate.testGraphNavigationDeterminism();
}
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/TckTestValidatorFactory.java b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/TckTestValidatorFactory.java
index 5baadb2..1dafc04 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/TckTestValidatorFactory.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/validation/graphnavigation/TckTestValidatorFactory.java
@@ -1,12 +1,12 @@
/*
* Copyright 2010 Google Inc.
- *
+ *
* Licensed under the Apache License, Version 2.0 (the "License"); you may not
* use this file except in compliance with the License. You may obtain a copy of
* the License at
- *
+ *
* http://www.apache.org/licenses/LICENSE-2.0
- *
+ *
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
@@ -32,8 +32,8 @@
*/
@GwtValidation(value = {
AnimalCaretaker.class, Condor.class, Elephant.class, GameReserve.class,
- MultiCage.class, MultiCage.class, Parent.class, SingleCage.class,
- User.class, Zebra.class, Zoo.class})
+ MultiCage.class, MultiCage.class, Order.class, Parent.class,
+ SingleCage.class, User.class, Zebra.class, Zoo.class})
public static interface GwtValidator extends Validator {
}