Integrate r11135, r11137, r11153, r11154, r11158, r11159, r11161 and r11163 into releases/2.5.

Review by: rdayal@google.com

git-svn-id: https://google-web-toolkit.googlecode.com/svn/releases/2.5@11273 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/common.ant.xml b/common.ant.xml
index 6084243..2608186 100755
--- a/common.ant.xml
+++ b/common.ant.xml
@@ -55,8 +55,8 @@
   <property name="javac.debug" value="true" />
   <property name="javac.debuglevel" value="lines,vars,source" />
   <property name="javac.encoding" value="utf-8" />
-  <property name="javac.source" value="1.5" />
-  <property name="javac.target" value="1.5" />
+  <property name="javac.source" value="1.6" />
+  <property name="javac.target" value="1.6" />
   <property name="javac.nowarn" value="true" />
   <property name="junit.out" location="${project.build}/test" />
   <property name="emma.dir" value="${gwt.tools.redist}/emma" />
diff --git a/dev/codeserver/build.xml b/dev/codeserver/build.xml
index 7086f21..f2c1e8d 100755
--- a/dev/codeserver/build.xml
+++ b/dev/codeserver/build.xml
@@ -37,6 +37,7 @@
 
   <target name="build" depends="compile" description="builds gwt-codeserver.jar">
     <gwt.jar>
+      <fileset dir="${src}" />
       <fileset dir="${javac.out}"/>
       <fileset dir="java">
         <include name="**/*.html"/>
diff --git a/user/src/com/google/gwt/validation/client/impl/AbstractGwtSpecificValidator.java b/user/src/com/google/gwt/validation/client/impl/AbstractGwtSpecificValidator.java
index 03287e1..925fbab 100644
--- a/user/src/com/google/gwt/validation/client/impl/AbstractGwtSpecificValidator.java
+++ b/user/src/com/google/gwt/validation/client/impl/AbstractGwtSpecificValidator.java
@@ -16,10 +16,10 @@
 package com.google.gwt.validation.client.impl;
 
 import java.lang.annotation.Annotation;
+import java.util.Arrays;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.HashMap;
-import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
 
@@ -66,6 +66,13 @@
     return new AttributeBuilder();
   }
 
+  protected Class<?>[] addDefaultGroupWhenEmpty(Class<?>[] groups) {
+    if (groups.length == 0) {
+      groups = new Class<?>[]{Default.class};
+    }
+    return groups;
+  }
+
   protected <V, T, A extends Annotation> void addSingleViolation(
       GwtValidationContext<T> context, Set<ConstraintViolation<T>> violations,
       G object, V value, ConstraintDescriptorImpl<A> constraintDescriptor) {
@@ -91,18 +98,11 @@
     ConstraintValidatorContextImpl<A, V> constraintValidatorContext =
         context.createConstraintValidatorContext(constraintDescriptor);
 
-    // TODO(nchalko) set empties to Default earlier.
     Set<Class<?>> constraintGroup = constraintDescriptor.getGroups();
-    if (groups.length == 0) {
-      groups = new Class<?>[]{Default.class};
-    }
-    if (constraintGroup.isEmpty()) {
-      constraintGroup = new HashSet<Class<?>>();
-      constraintGroup.add(Default.class);
-    }
 
-    // check group
-    if (!containsAny(groups, constraintGroup)) {
+    // check groups requested are in the set of constraint groups (including the implicit group)
+    if (!containsAny(groups, constraintGroup)
+        && !Arrays.asList(groups).contains(getConstraints().getElementClass())) {
       return false;
     }
 
@@ -162,6 +162,7 @@
         .setPropertyPath(messageAndPath.getPath()) //
         .setRootBean(context.getRootBean()) //
         .setRootBeanClass(context.getRootBeanClass()) //
+        .setElementType(constraintDescriptor.getElementType()) //
         .build();
     return violation;
   }
diff --git a/user/src/com/google/gwt/validation/client/impl/ConstraintDescriptorImpl.java b/user/src/com/google/gwt/validation/client/impl/ConstraintDescriptorImpl.java
index 4a4d4dd..1baad70 100644
--- a/user/src/com/google/gwt/validation/client/impl/ConstraintDescriptorImpl.java
+++ b/user/src/com/google/gwt/validation/client/impl/ConstraintDescriptorImpl.java
@@ -16,6 +16,7 @@
 package com.google.gwt.validation.client.impl;
 
 import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
 import java.util.Arrays;
 import java.util.HashSet;
 import java.util.List;
@@ -51,6 +52,7 @@
     private Set<ConstraintDescriptor<?>> composingConstraints =
         new HashSet<ConstraintDescriptor<?>>();
     private boolean reportAsSingleViolation;
+    private ElementType elementType;
 
     public Builder<T> addComposingConstraint(
         ConstraintDescriptor<?> composingConstraint) {
@@ -66,7 +68,8 @@
           constraintValidatorClasses, //
           attributes, //
           composingConstraints, //
-          reportAsSingleViolation);
+          reportAsSingleViolation, //
+          elementType);
     }
 
     public Builder<T> setAnnotation(T annotation) {
@@ -91,6 +94,11 @@
       this.constraintValidatorClasses = constraintValidatorClasses;
       return this;
     }
+    
+    public Builder<T> setElementType(ElementType elementType) {
+      this.elementType = elementType;
+      return this;
+    }
 
     public Builder<T> setGroups(Class<?>[] classes) {
       setGroups(new HashSet<Class<?>>(Arrays.asList(classes)));
@@ -129,6 +137,7 @@
   private final Map<String, Object> attributes;
   private final Set<ConstraintDescriptor<?>> composingConstraints;
   private final boolean reportAsSingleViolation;
+  private ElementType elementType;
 
   private ConstraintDescriptorImpl(
       T annotation,
@@ -137,7 +146,8 @@
       List<Class<? extends ConstraintValidator<T, ?>>> constraintValidatorClasses,
       Map<String, Object> attributes,
       Set<ConstraintDescriptor<?>> composingConstraints,
-      boolean reportAsSingleViolation) {
+      boolean reportAsSingleViolation,
+      ElementType elementType) {
     super();
     this.annotation = annotation;
     this.groups = groups;
@@ -146,6 +156,7 @@
     this.attributes = attributes;
     this.composingConstraints = composingConstraints;
     this.reportAsSingleViolation = reportAsSingleViolation;
+    this.elementType = elementType;
   }
 
   public T getAnnotation() {
@@ -164,6 +175,10 @@
     return constraintValidatorClasses;
   }
 
+  public ElementType getElementType() {
+    return elementType;
+  }
+
   public Set<Class<?>> getGroups() {
     return groups;
   }
diff --git a/user/src/com/google/gwt/validation/client/impl/ConstraintValidatorContextImpl.java b/user/src/com/google/gwt/validation/client/impl/ConstraintValidatorContextImpl.java
index 8467d51..470c1a1 100644
--- a/user/src/com/google/gwt/validation/client/impl/ConstraintValidatorContextImpl.java
+++ b/user/src/com/google/gwt/validation/client/impl/ConstraintValidatorContextImpl.java
@@ -130,10 +130,7 @@
     }
 
     public ConstraintValidatorContext addConstraintViolation() {
-      ConstraintViolation<T> violation = ConstraintViolationImpl.<T> builder().setPropertyPath(
-          path).setMessageTemplate(messageTemplate).build();
-
-      parent.context.violations.add(violation);
+      messages.add(new MessageAndPath(path, messageTemplate));
       return parent.context;
     }
 
diff --git a/user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java b/user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java
index a1696ac..038775d 100644
--- a/user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java
+++ b/user/src/com/google/gwt/validation/client/impl/ConstraintViolationImpl.java
@@ -16,6 +16,7 @@
 package com.google.gwt.validation.client.impl;
 
 import java.io.Serializable;
+import java.lang.annotation.ElementType;
 
 import javax.validation.ConstraintViolation;
 import javax.validation.Path;
@@ -45,11 +46,12 @@
     private Object leafBean;
     private Path propertyPath;
     private Object invalidValue;
+    private ElementType elementType;
     private ConstraintDescriptor<?> constraintDescriptor;
 
     public ConstraintViolationImpl<T> build() {
       return new ConstraintViolationImpl<T>(message, messageTemplate, rootBean,
-          rootBeanClass, leafBean, propertyPath, invalidValue,
+          rootBeanClass, leafBean, propertyPath, invalidValue, elementType,
           constraintDescriptor);
     }
 
@@ -59,6 +61,11 @@
       return this;
     }
 
+    public Builder<T> setElementType(ElementType elementType) {
+      this.elementType = elementType;
+      return this;
+    }
+
     public Builder<T> setInvalidValue(Object invalidValue) {
       this.invalidValue = invalidValue;
       return this;
@@ -108,6 +115,7 @@
   private final Object leafBean;
   private final Path propertyPath;
   private final Object invalidValue;
+  private final ElementType elementType;
   private final ConstraintDescriptor<?> constraintDescriptor;
 
   /**
@@ -122,7 +130,8 @@
    */
   private ConstraintViolationImpl(String message, String messageTemplate,
       T rootBean, Class<T> rootBeanClass, Object leafBean, Path propertyPath,
-      Object invalidValue, ConstraintDescriptor<?> constraintDescriptor) {
+      Object invalidValue, ElementType elementType,
+      ConstraintDescriptor<?> constraintDescriptor) {
     super();
     this.message = message;
     this.messageTemplate = messageTemplate;
@@ -131,49 +140,89 @@
     this.leafBean = leafBean;
     this.propertyPath = propertyPath;
     this.invalidValue = invalidValue;
+    this.elementType = elementType;
     this.constraintDescriptor = constraintDescriptor;
   }
 
+  @Override
+  public boolean equals(Object o) {
+    if (this == o) {
+      return true;
+    }
+    if (!(o instanceof ConstraintViolationImpl)) {
+      return false;
+    }
+    ConstraintViolationImpl<?> other = (ConstraintViolationImpl<?>) o;
+    return (message == null ? other.message == null : message.equals(other.message)
+        && propertyPath == null ? other.propertyPath == null :
+          propertyPath.equals(other.propertyPath)
+        && rootBean == null ? other.rootBean == null : rootBean.equals(other.rootBean)
+        && leafBean == null ? other.leafBean == null : leafBean.equals(other.leafBean)
+        && elementType == null ? other.elementType == null : elementType.equals(other.elementType)
+        && invalidValue == null ? other.invalidValue == null :
+          invalidValue.equals(other.invalidValue));
+  }
+
+  @Override
   public ConstraintDescriptor<?> getConstraintDescriptor() {
     return constraintDescriptor;
   }
 
+  @Override
   public Object getInvalidValue() {
     return invalidValue;
   }
 
+  @Override
   public Object getLeafBean() {
     return leafBean;
   }
 
+  @Override
   public String getMessage() {
     return message;
   }
 
+  @Override
   public String getMessageTemplate() {
     return messageTemplate;
   }
 
+  @Override
   public Path getPropertyPath() {
     return propertyPath;
   }
 
+  @Override
   public T getRootBean() {
     return rootBean;
   }
 
+  @Override
   public Class<T> getRootBeanClass() {
     return rootBeanClass;
   }
 
+  @Override
+  public int hashCode() {
+    int result = message != null ? message.hashCode() : 0;
+    result = 31 * result + (propertyPath != null ? propertyPath.hashCode() : 0);
+    result = 31 * result + (rootBean != null ? rootBean.hashCode() : 0);
+    result = 31 * result + (leafBean != null ? leafBean.hashCode() : 0);
+    result = 31 * result + (elementType != null ? elementType.hashCode() : 0);
+    result = 31 * result + (invalidValue != null ? invalidValue.hashCode() : 0);
+    return result;
+  }
+
   /**
    * For debugging only. Do not rely on the format. It can change at any time.
    */
   @Override
   public String toString() {
-    return "message= " + message //
+    return "ConstraintViolationImpl(message= " + message //
         + ", path= " + propertyPath //
         + ", invalidValue=" + invalidValue //
-        + ", desc=" + constraintDescriptor;
+        + ", desc=" + constraintDescriptor //
+        + ", elementType=" + elementType + ")";
   }
 }
diff --git a/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java b/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
index 9cff540..a95d9b9 100644
--- a/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
+++ b/user/src/com/google/gwt/validation/rebind/GwtSpecificValidatorCreator.java
@@ -52,9 +52,11 @@
 import java.beans.IntrospectionException;
 import java.beans.Introspector;
 import java.lang.annotation.Annotation;
+import java.lang.annotation.ElementType;
 import java.lang.reflect.Field;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
 import java.util.Collection;
 import java.util.HashSet;
 import java.util.List;
@@ -69,6 +71,7 @@
 import javax.validation.UnexpectedTypeException;
 import javax.validation.Valid;
 import javax.validation.ValidationException;
+import javax.validation.groups.Default;
 import javax.validation.metadata.BeanDescriptor;
 import javax.validation.metadata.ConstraintDescriptor;
 import javax.validation.metadata.PropertyDescriptor;
@@ -434,6 +437,10 @@
           Class<?> valueType = valueMethod.getReturnType();
           if (valueType.isArray()
               && Annotation.class.isAssignableFrom(valueType.getComponentType())) {
+            if (Modifier.isAbstract(valueMethod.getModifiers())) {
+              // handle edge case where interface is marked "abstract"
+              valueMethod.setAccessible(true);
+            }
             Annotation[] valueAnnotions = (Annotation[]) valueMethod.invoke(annotation);
             for (Annotation annotation2 : valueAnnotions) {
               if (expectedAnnotation.equals(annotation2)) {
@@ -482,6 +489,28 @@
     return getAnnotation(p, useField, Valid.class) != null;
   }
 
+  /**
+   * Handles returning an {@link ElementType} for a given property constraint.
+   * In the situation where a property has the same constraint type applied to it twice
+   * (once via a field and once via a method), then {@link ElementType#FIELD} is returned first
+   * and {@link ElementType#METHOD} is returned after. This should be safe because the bean
+   * introspection always returns field annotations before getter annotations.
+   */
+  private ElementType inferElementType(PropertyDescriptor propertyDescriptor,
+      boolean seenBefore) {
+    if (beanHelper.hasField(propertyDescriptor)) {
+      if (beanHelper.hasGetter(propertyDescriptor)) {
+        // this property should be validated twice
+        if (seenBefore) {
+          // the FIELD type has already been returned the first time
+          return ElementType.METHOD;
+        }
+      }
+      return ElementType.FIELD;
+    }
+    return ElementType.METHOD;
+  }
+
   private boolean isPropertyConstrained(BeanHelper helper, PropertyDescriptor p) {
     Set<PropertyDescriptor> propertyDescriptors =
         helper.getBeanDescriptor().getConstrainedProperties();
@@ -592,6 +621,7 @@
 
   private void writeConstraintDescriptor(SourceWriter sw,
       ConstraintDescriptor<? extends Annotation> constraint,
+      ElementType elementType,
       String constraintDescripotorVar) throws UnableToCompleteException {
     Class<? extends Annotation> annotationType =
         constraint.getAnnotation().annotationType();
@@ -600,7 +630,7 @@
     int count = 0;
     for (ConstraintDescriptor<?> composingConstraint :
         constraint.getComposingConstraints()) {
-      writeConstraintDescriptor(sw, composingConstraint,
+      writeConstraintDescriptor(sw, composingConstraint, elementType,
           constraintDescripotorVar + "_" + count++);
     }
 
@@ -642,9 +672,15 @@
         constraint.getAttributes().entrySet()) {
       // .put(key, value)
       sw.print(".put(");
-      sw.print(asLiteral(entry.getKey()));
+      String key = entry.getKey();
+      sw.print(asLiteral(key));
       sw.print(", ");
-      sw.print(asLiteral(entry.getValue()));
+      Object value = entry.getValue();
+      // Add the Default group if it is not already present
+      if ("groups".equals(key) && value instanceof Class[] && ((Class[])value).length == 0) {
+        value = new Class[] { Default.class };
+      }
+      sw.print(asLiteral(value));
       sw.println(")");
     }
 
@@ -684,6 +720,11 @@
         .toString());
     sw.println(")");
 
+    // .setElementType(elementType)
+    sw.print(".setElementType(");
+    sw.print(asLiteral(elementType));
+    sw.println(")");
+
     // .build();
     sw.println(".build();");
     sw.outdent();
@@ -732,9 +773,13 @@
     for (PropertyDescriptor p :
          beanHelper.getBeanDescriptor().getConstrainedProperties()) {
       int count = 0;
+      // Check if the same annotation is applied to the same property twice (getter and field)
+      Set<Object> seen = Sets.newHashSet();
       for (ConstraintDescriptor<?> constraint : p.getConstraintDescriptors()) {
         writeConstraintDescriptor(sw, constraint,
+            inferElementType(p, seen.contains(constraint.getAnnotation())),
             constraintDescriptorVar(p.getPropertyName(), count++));
+        seen.add(constraint.getAnnotation());
       }
       writePropertyDescriptor(sw, p);
       if (p.isCascaded()) {
@@ -748,7 +793,7 @@
     int count = 0;
     for (ConstraintDescriptor<?> constraint :
         beanHelper.getBeanDescriptor().getConstraintDescriptors()) {
-      writeConstraintDescriptor(sw, constraint,
+      writeConstraintDescriptor(sw, constraint, ElementType.TYPE,
           constraintDescriptorVar("this", count++));
     }
 
@@ -974,6 +1019,9 @@
     sw.println(beanHelper.getTypeCanonicalName() + " object,");
     sw.println("Class<?>... groups) {");
     sw.outdent();
+    
+    // groups = addDefaultGroupWhenEmpty(groups);
+    sw.println("groups = addDefaultGroupWhenEmpty(groups);");
 
     // try {
     sw.println("try {");
@@ -1531,6 +1579,9 @@
     sw.print(p.getPropertyName());
     sw.println("\");");
 
+    // groups = addDefaultGroupWhenEmpty(groups);
+    sw.println("groups = addDefaultGroupWhenEmpty(groups);");
+
     // TODO(nchalko) move this out of here to the Validate method
     if (p.isCascaded() && hasValid(p, useField)) {
 
@@ -1572,20 +1623,32 @@
     // It is possible for an annotation with the exact same values to be set on
     // both the field and the getter.
     // Keep track of the ones we have used to make sure we don't duplicate.
-    // It doesn't matter which one we use because they have exactly the same
-    // values.
     Set<Object> includedAnnotations = Sets.newHashSet();
     int count = 0;
     for (ConstraintDescriptor<?> constraint : p.getConstraintDescriptors()) {
       Object annotation = constraint.getAnnotation();
-      if (!includedAnnotations.contains(annotation)
-          && hasMatchingAnnotation(p, useField, constraint)) {
+      if (hasMatchingAnnotation(p, useField, constraint)) {
+        String constraintDescriptorVar = constraintDescriptorVar(p.getPropertyName(), count);
+        if (!includedAnnotations.contains(annotation)) {
+          if (useField) {
+            writeValidateConstraint(sw, p, elementClass, constraint, constraintDescriptorVar);
+          } else {
+            // The annotation hasn't been looked at twice (yet) and we are validating a getter
+            // Write the call if only the getter has this constraint applied to it
+            boolean hasField = beanHelper.hasField(p);
+            if (!hasField ||
+                (hasField && !hasMatchingAnnotation(p, true, constraint))) {
+              writeValidateConstraint(sw, p, elementClass, constraint, constraintDescriptorVar);
+            }
+          }
+        } else {
+          // The annotation has been looked at once already during this validate property call
+          // so we know the field and the getter are both annotated with the same constraint.
+          if (!useField) {
+            writeValidateConstraint(sw, p, elementClass, constraint, constraintDescriptorVar);
+          }
+        }
         includedAnnotations.add(annotation);
-        String constraintDescriptorVar = constraintDescriptorVar(
-            p.getPropertyName(), count);
-
-        writeValidateConstraint(sw, p, elementClass, constraint,
-            constraintDescriptorVar);
       }
       count++;
     }
@@ -1609,6 +1672,9 @@
     sw.println("Class<?>... groups) {");
     sw.outdent();
 
+    // groups = addDefaultGroupWhenEmpty(groups);
+    sw.println("groups = addDefaultGroupWhenEmpty(groups);");
+
     // try {
     sw.println("try {");
     sw.indent();
@@ -1702,4 +1768,4 @@
       sw.println();
     }
   }
-}
+}
\ No newline at end of file
diff --git a/user/test/com/google/gwt/validation/tck/ConstraintCompositionGwtSuite.java b/user/test/com/google/gwt/validation/tck/ConstraintCompositionGwtSuite.java
index bc983b4..6f75797 100644
--- a/user/test/com/google/gwt/validation/tck/ConstraintCompositionGwtSuite.java
+++ b/user/test/com/google/gwt/validation/tck/ConstraintCompositionGwtSuite.java
@@ -19,7 +19,6 @@
 
 import org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.ConstraintCompositionCompileTest;
 import org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.ConstraintCompositionGwtTest;
-import org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition.NestedConstraintCompositionGwtTest;
 import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;
 
 /**
@@ -31,7 +30,6 @@
         "TCK for GWT Validation, constraints composition package");
     suite.addTestSuite(ConstraintCompositionCompileTest.class);
     suite.addTestSuite(ConstraintCompositionGwtTest.class);
-    suite.addTestSuite(NestedConstraintCompositionGwtTest.class);
     return suite;
   }
 }
diff --git a/user/test/com/google/gwt/validation/tck/NestedConstraintCompositionGwtSuite.java b/user/test/com/google/gwt/validation/tck/NestedConstraintCompositionGwtSuite.java
new file mode 100644
index 0000000..fa7d418
--- /dev/null
+++ b/user/test/com/google/gwt/validation/tck/NestedConstraintCompositionGwtSuite.java
@@ -0,0 +1,33 @@
+/*
+ * 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
+ * License for the specific language governing permissions and limitations under
+ * the License.
+ */
+package com.google.gwt.validation.tck;
+
+import junit.framework.Test;
+
+import org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition.NestedConstraintCompositionGwtTest;
+import org.hibernate.jsr303.tck.util.TckTestSuiteWrapper;
+
+/**
+ * Tck Tests for the {@code nested constraints composition} package.
+ */
+public class NestedConstraintCompositionGwtSuite {
+  public static Test suite() {
+    TckTestSuiteWrapper suite = new TckTestSuiteWrapper(
+        "TCK for GWT Validation, nested constraints composition package");
+    suite.addTestSuite(NestedConstraintCompositionGwtTest.class);
+    return suite;
+  }
+}
diff --git a/user/test/org/hibernate/jsr303/tck/tests/constraints/application/ValidationRequirementGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/constraints/application/ValidationRequirementGwtTest.java
index d68ec32..f290c91 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/constraints/application/ValidationRequirementGwtTest.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/constraints/application/ValidationRequirementGwtTest.java
@@ -17,8 +17,6 @@
 
 import com.google.gwt.junit.client.GWTTestCase;
 
-import org.hibernate.jsr303.tck.util.client.Failing;
-
 /**
  * Wraps {@link ValidationRequirementTest} .
  */
@@ -37,7 +35,6 @@
     return "org.hibernate.jsr303.tck.tests.constraints.application.TckTest";
   }
 
-  @Failing(issue = 5798)
   public void testClassLevelConstraints() {
     delegate.testClassLevelConstraints();
   }
diff --git a/user/test/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintCompositionGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintCompositionGwtTest.java
index b22b24d..6c0b110 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintCompositionGwtTest.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/nestedconstraintcomposition/NestedConstraintCompositionGwtTest.java
@@ -17,7 +17,6 @@
 
 import com.google.gwt.junit.client.GWTTestCase;
 
-import org.hibernate.jsr303.tck.util.client.Failing;
 import org.hibernate.jsr303.tck.util.client.NonTckTest;
 
 /**
@@ -25,7 +24,7 @@
  */
 public class NestedConstraintCompositionGwtTest extends GWTTestCase {
 
-  //private NestedConstraintCompositionTest delegate = new NestedConstraintCompositionTest();
+  private NestedConstraintCompositionTest delegate = new NestedConstraintCompositionTest();
 
 
   @Override
@@ -33,28 +32,20 @@
     return "org.hibernate.jsr303.tck.tests.constraints.constraintcomposition.nestedconstraintcomposition.TckTest";
   }
 
-  @Failing(issue = 1744804)
   public void testCompositeConstraint1WithNestedConstraintSingleViolation() {
-    //delegate.testCompositeConstraint1WithNestedConstraintSingleViolation();
-    fail();
+    delegate.testCompositeConstraint1WithNestedConstraintSingleViolation();
   }
 
-  @Failing(issue = 1744804)
   public void testCompositeConstraint2WithNestedConstraintSingleViolation() {
-    //delegate.testCompositeConstraint2WithNestedConstraintSingleViolation();
-    fail();
+    delegate.testCompositeConstraint2WithNestedConstraintSingleViolation();
   }
 
-  @Failing(issue = 1744804)
   public void testCompositeConstraint3WithNestedConstraint() {
-    //delegate.testCompositeConstraint3WithNestedConstraint();
-    fail();
+    delegate.testCompositeConstraint3WithNestedConstraint();
   }
 
-  @Failing(issue = 1744804)
   public void testCompositeConstraint4WithNestedConstraintSingleViolation() {
-    //delegate.testCompositeConstraint4WithNestedConstraintSingleViolation();
-    fail();
+    delegate.testCompositeConstraint4WithNestedConstraintSingleViolation();
   }
   
   @NonTckTest
diff --git a/user/test/org/hibernate/jsr303/tck/tests/constraints/constraintdefinition/ConstraintDefinitionsGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/constraints/constraintdefinition/ConstraintDefinitionsGwtTest.java
index a50cb37..922b7c9 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/constraints/constraintdefinition/ConstraintDefinitionsGwtTest.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/constraints/constraintdefinition/ConstraintDefinitionsGwtTest.java
@@ -17,7 +17,6 @@
 
 import com.google.gwt.junit.client.GWTTestCase;
 
-import org.hibernate.jsr303.tck.util.client.Failing;
 import org.hibernate.jsr303.tck.util.client.NonTckTest;
 
 /**
@@ -25,26 +24,19 @@
  */
 public class ConstraintDefinitionsGwtTest extends GWTTestCase {
 
-  // TODO(nchalko) Generating Person validator fails.
-  // see http://code.google.com/p/google-web-toolkit/issues/detail?id=6284
-  // private ConstraintDefinitionsTest delegate = new
-  // ConstraintDefinitionsTest();
+  private ConstraintDefinitionsTest delegate = new ConstraintDefinitionsTest();
 
   @Override
   public String getModuleName() {
     return "org.hibernate.jsr303.tck.tests.constraints.constraintdefinition.TckTest";
   }
 
-  @Failing(issue = 6284)
   public void testConstraintWithCustomAttributes() {
-    fail();
-    // delegate.testConstraintWithCustomAttributes();
+    delegate.testConstraintWithCustomAttributes();
   }
 
-  @Failing(issue = 6284)
   public void testDefaultGroupAssumedWhenNoGroupsSpecified() {
-    fail();
-    // delegate.testDefaultGroupAssumedWhenNoGroupsSpecified();
+    delegate.testDefaultGroupAssumedWhenNoGroupsSpecified();
   }
 
   @NonTckTest
diff --git a/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupGwtTest.java
index 7eb31ba..8a3c42a 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupGwtTest.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/constraints/groups/GroupGwtTest.java
@@ -55,7 +55,6 @@
     delegate.testGroupSequenceFollowedByGroup();
   }
 
-  @Failing(issue = 5801)
   public void testImplicitGrouping() {
     delegate.testImplicitGrouping();
   }
diff --git a/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextGwtTest.java b/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextGwtTest.java
index c3c1cb6..3fe08dd 100644
--- a/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextGwtTest.java
+++ b/user/test/org/hibernate/jsr303/tck/tests/validation/validatorcontext/ConstraintValidatorContextGwtTest.java
@@ -17,8 +17,6 @@
 
 import com.google.gwt.junit.client.GWTTestCase;
 
-import org.hibernate.jsr303.tck.util.client.Failing;
-
 /**
  * Test wrapper for {@link ConstraintValidatorContextTest}.
  */
@@ -39,7 +37,6 @@
     delegate.testDisableDefaultErrorWithCustomErrorNoSubNode();
   }
 
-  @Failing(issue = 6907)
   public void testDisableDefaultErrorWithCustomErrorWithSubNode() {
     delegate.testDisableDefaultErrorWithCustomErrorWithSubNode();
   }