Hibernate SVN: r17419 - validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-26 06:54:59 -0400 (Wed, 26 Aug 2009)
New Revision: 17419
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/ConstraintDescriptorImpl.java
Log:
HV-183 Made sure that payloads are propagated.
Also fixed several typos.
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/ConstraintDescriptorImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/ConstraintDescriptorImpl.java 2009-08-26 10:50:09 UTC (rev 17418)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/ConstraintDescriptorImpl.java 2009-08-26 10:54:59 UTC (rev 17419)
@@ -20,6 +20,7 @@
import java.lang.annotation.Annotation;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import java.security.AccessController;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -28,7 +29,6 @@
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.security.AccessController;
import javax.validation.Constraint;
import javax.validation.ConstraintDefinitionException;
import javax.validation.ConstraintPayload;
@@ -41,11 +41,11 @@
import org.slf4j.Logger;
-import org.hibernate.validation.util.LoggerFactory;
import org.hibernate.validation.util.GetAnnotationParameter;
+import org.hibernate.validation.util.GetDeclaredMethods;
+import org.hibernate.validation.util.GetMethod;
import org.hibernate.validation.util.GetMethods;
-import org.hibernate.validation.util.GetMethod;
-import org.hibernate.validation.util.GetDeclaredMethods;
+import org.hibernate.validation.util.LoggerFactory;
import org.hibernate.validation.util.annotationfactory.AnnotationDescriptor;
import org.hibernate.validation.util.annotationfactory.AnnotationFactory;
@@ -70,7 +70,7 @@
* The set of classes implementing the validation for this constraint. See also
* <code>ConstraintValidator</code> resolution algorithm.
*/
- private final List<Class<? extends ConstraintValidator<T, ?>>> constraintValidatorDefinitonClasses;
+ private final List<Class<? extends ConstraintValidator<T, ?>>> constraintValidatorDefinitionClasses;
/**
* The groups for which to apply this constraint.
@@ -78,7 +78,7 @@
private final Set<Class<?>> groups;
/**
- * The constraint parameters as map. The key is the paramter name and the value the
+ * The constraint parameters as map. The key is the parameter name and the value the
* parameter value as specified in the constraint.
*/
private final Map<String, Object> attributes;
@@ -96,7 +96,7 @@
private final boolean isReportAsSingleInvalidConstraint;
/**
- * Handle to the builtin constraint implementations.
+ * Handle to the built-in constraint implementations.
*/
private final ConstraintHelper constraintHelper;
@@ -107,12 +107,12 @@
ReportAsSingleViolation.class
);
- // HV-181 - To avoid and thread visibilty issues we are building the different data structures in tmp variables and
+ // HV-181 - To avoid and thread visibility issues we are building the different data structures in tmp variables and
// then assign them to the final variables
this.attributes = buildAnnotationParameterMap( annotation );
this.groups = buildGroupSet( implicitGroup );
this.payloads = buildPayloadSet( annotation );
- this.constraintValidatorDefinitonClasses = findConstraintValidatorClasses();
+ this.constraintValidatorDefinitionClasses = findConstraintValidatorClasses();
this.composingConstraints = parseComposingConstraints();
}
@@ -125,8 +125,10 @@
Class<ConstraintPayload>[] payloadFromAnnotation;
try {
//TODO be extra safe and make sure this is an array of ConstraintPayload
- GetAnnotationParameter<Class[]> action = GetAnnotationParameter.action( annotation, PAYLOAD, Class[].class );
- if (System.getSecurityManager() != null) {
+ GetAnnotationParameter<Class[]> action = GetAnnotationParameter.action(
+ annotation, PAYLOAD, Class[].class
+ );
+ if ( System.getSecurityManager() != null ) {
payloadFromAnnotation = AccessController.doPrivileged( action );
}
else {
@@ -147,7 +149,7 @@
Set<Class<?>> groupSet = new HashSet<Class<?>>();
final Class<?>[] groupsFromAnnotation;
GetAnnotationParameter<Class[]> action = GetAnnotationParameter.action( annotation, GROUPS, Class[].class );
- if (System.getSecurityManager() != null) {
+ if ( System.getSecurityManager() != null ) {
groupsFromAnnotation = AccessController.doPrivileged( action );
}
else {
@@ -178,22 +180,22 @@
return Collections.unmodifiableList( constraintValidatorClasses );
}
- List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintDefinitonClasses = new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>();
+ List<Class<? extends ConstraintValidator<? extends Annotation, ?>>> constraintDefinitionClasses = new ArrayList<Class<? extends ConstraintValidator<? extends Annotation, ?>>>();
if ( constraintHelper.isBuiltinConstraint( annotation.annotationType() ) ) {
- constraintDefinitonClasses.addAll( constraintHelper.getBuiltInConstraints( annotationType ) );
+ constraintDefinitionClasses.addAll( constraintHelper.getBuiltInConstraints( annotationType ) );
}
else {
Class<? extends ConstraintValidator<?, ?>>[] validatedBy = annotationType
.getAnnotation( Constraint.class )
.validatedBy();
- constraintDefinitonClasses.addAll( Arrays.asList( validatedBy ) );
+ constraintDefinitionClasses.addAll( Arrays.asList( validatedBy ) );
}
constraintHelper.addConstraintValidatorDefinition(
- annotation.annotationType(), constraintDefinitonClasses
+ annotation.annotationType(), constraintDefinitionClasses
);
- for ( Class<? extends ConstraintValidator<? extends Annotation, ?>> validator : constraintDefinitonClasses ) {
+ for ( Class<? extends ConstraintValidator<? extends Annotation, ?>> validator : constraintDefinitionClasses ) {
@SuppressWarnings("unchecked")
Class<? extends ConstraintValidator<T, ?>> safeValidator = ( Class<? extends ConstraintValidator<T, ?>> ) validator;
constraintValidatorClasses.add( safeValidator );
@@ -219,7 +221,7 @@
}
public List<Class<? extends ConstraintValidator<T, ?>>> getConstraintValidatorClasses() {
- return constraintValidatorDefinitonClasses;
+ return constraintValidatorDefinitionClasses;
}
public Map<String, Object> getAttributes() {
@@ -238,7 +240,7 @@
public String toString() {
return "ConstraintDescriptorImpl{" +
"annotation=" + annotation +
- ", constraintValidatorDefinitonClasses=" + constraintValidatorDefinitonClasses.toString() +
+ ", constraintValidatorDefinitionClasses=" + constraintValidatorDefinitionClasses.toString() +
", groups=" + groups +
", attributes=" + attributes +
", composingConstraints=" + composingConstraints +
@@ -340,14 +342,14 @@
else {
method = getMethod.run();
}
- if (method == null) {
+ if ( method == null ) {
throw new ConstraintDefinitionException(
- "Overriden constraint does not define an attribute with name " + overridesAttribute.name()
+ "Overridden constraint does not define an attribute with name " + overridesAttribute.name()
);
}
- Class<?> returnTypeOfOverridenConstraint = method.getReturnType();
- if ( !returnTypeOfOverridenConstraint.equals( m.getReturnType() ) ) {
- String message = "The overiding type of a composite constraint must be identical to the overwridden one. Expected " + returnTypeOfOverridenConstraint
+ Class<?> returnTypeOfOverriddenConstraint = method.getReturnType();
+ if ( !returnTypeOfOverriddenConstraint.equals( m.getReturnType() ) ) {
+ String message = "The overriding type of a composite constraint must be identical to the overridden one. Expected " + returnTypeOfOverriddenConstraint
.getName() + " found " + m.getReturnType();
throw new ConstraintDefinitionException( message );
}
@@ -414,8 +416,11 @@
}
// groups get inherited from the parent
- annotationDescriptor.setValue( GROUPS, groups.toArray( new Class<?>[groups.size()]) );
+ annotationDescriptor.setValue( GROUPS, groups.toArray( new Class<?>[groups.size()] ) );
+ // HV-183 - payloads are propagated to composing constraints
+ annotationDescriptor.setValue( PAYLOAD, payloads.toArray( new Class<?>[payloads.size()] ) );
+
U annotationProxy = AnnotationFactory.create( annotationDescriptor );
return new ConstraintDescriptorImpl<U>(
annotationProxy, constraintHelper
@@ -423,7 +428,7 @@
}
/**
- * A wrapper class to keep track for which compposing constraints (class and index) a given attribute override applies to.
+ * A wrapper class to keep track for which composing constraints (class and index) a given attribute override applies to.
*/
private class ClassIndexWrapper {
final Class<?> clazz;
15 years, 4 months
Hibernate SVN: r17418 - beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-26 06:50:09 -0400 (Wed, 26 Aug 2009)
New Revision: 17418
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Friend.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Name.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Severity.java
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/ConstraintCompositionTest.java
Log:
Added test for payload propagation. Needs still to be mapped to n assertion
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/ConstraintCompositionTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/ConstraintCompositionTest.java 2009-08-25 16:07:55 UTC (rev 17417)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/ConstraintCompositionTest.java 2009-08-26 10:50:09 UTC (rev 17418)
@@ -22,6 +22,7 @@
import java.util.List;
import java.util.Set;
import javax.validation.ConstraintDefinitionException;
+import javax.validation.ConstraintPayload;
import javax.validation.ConstraintViolation;
import javax.validation.UnexpectedTypeException;
import javax.validation.Validator;
@@ -262,6 +263,25 @@
}
}
+ @Test
+ public void testPayloadPropagationInComposedConstraints() {
+ Friend john = new Friend( "John", "Doe" );
+
+ Validator validator = TestUtil.getValidatorUnderTest();
+ Set<ConstraintViolation<Friend>> constraintViolations = validator.validate( john );
+
+ assertCorrectNumberOfViolations( constraintViolations, 1 );
+ assertCorrectConstraintTypes( constraintViolations, NotNull.class );
+
+ ConstraintViolation<Friend> constraintViolation = constraintViolations.iterator().next();
+ Set<Class<ConstraintPayload>> payloads = constraintViolation.getConstraintDescriptor().getPayload();
+
+ assertTrue( payloads.size() == 1, "There should be one payload in the set" );
+ Class<ConstraintPayload> payload = payloads.iterator().next();
+ assertTrue( payload.getName().equals( Severity.Warn.class.getName() ), "Unexpected payload" );
+ }
+
+
private FrenchAddress getFrenchAddressWithoutZipCode() {
FrenchAddress address = new FrenchAddress();
address.setAddressline1( "10 rue des Treuils" );
Added: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Friend.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Friend.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Friend.java 2009-08-26 10:50:09 UTC (rev 17418)
@@ -0,0 +1,61 @@
+// $Id:$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 org.hibernate.jsr303.tck.tests.constraints.constraintcomposition;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Friend {
+ @Name(payload = Severity.Error.class)
+ private String firstName;
+
+ @Name(payload = Severity.Error.class)
+ private String lastName;
+
+ @Name(payload = Severity.Warn.class)
+ private String nickName;
+
+ public Friend(String firstName, String lastName) {
+ this.firstName = firstName;
+ this.lastName = lastName;
+ }
+
+ public String getNickName() {
+ return nickName;
+ }
+
+ public void setNickName(String nickName) {
+ this.nickName = nickName;
+ }
+
+ public String getFirstName() {
+ return firstName;
+ }
+
+ public void setFirstName(String firstName) {
+ this.firstName = firstName;
+ }
+
+ public String getLastName() {
+ return lastName;
+ }
+
+ public void setLastName(String lastName) {
+ this.lastName = lastName;
+ }
+}
Added: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Name.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Name.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Name.java 2009-08-26 10:50:09 UTC (rev 17418)
@@ -0,0 +1,47 @@
+// $Id:$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 org.hibernate.jsr303.tck.tests.constraints.constraintcomposition;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import static java.lang.annotation.ElementType.TYPE;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.ConstraintPayload;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Documented
+@NotNull
+@Size
+@Constraint(validatedBy = { })
+@Target({ TYPE, METHOD, FIELD })
+@Retention(RUNTIME)
+public @interface Name {
+ String message() default "Not a valid name.";
+
+ Class<?>[] groups() default { };
+
+ Class<? extends ConstraintPayload>[] payload() default { };
+}
\ No newline at end of file
Added: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Severity.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Severity.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/Severity.java 2009-08-26 10:50:09 UTC (rev 17418)
@@ -0,0 +1,35 @@
+// $Id:$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 org.hibernate.jsr303.tck.tests.constraints.constraintcomposition;
+
+import javax.validation.ConstraintPayload;
+
+/**
+ * @author Hardy Ferentschik
+ */
+
+public class Severity {
+ public static class Info implements ConstraintPayload {
+ }
+
+ public static class Warn implements ConstraintPayload {
+ }
+
+ public static class Error implements ConstraintPayload {
+ }
+}
15 years, 4 months
Hibernate SVN: r17417 - validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-25 12:07:55 -0400 (Tue, 25 Aug 2009)
New Revision: 17417
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ResourceBundleMessageInterpolator.java
Log:
HV-189
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ResourceBundleMessageInterpolator.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ResourceBundleMessageInterpolator.java 2009-08-25 15:25:56 UTC (rev 17416)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ResourceBundleMessageInterpolator.java 2009-08-25 16:07:55 UTC (rev 17417)
@@ -17,20 +17,21 @@
*/
package org.hibernate.validation.engine;
+import java.security.AccessController;
import java.util.Locale;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;
+import java.util.WeakHashMap;
import java.util.concurrent.ConcurrentHashMap;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
-import java.security.AccessController;
import javax.validation.MessageInterpolator;
import org.slf4j.Logger;
+import org.hibernate.validation.util.GetClassLoader;
import org.hibernate.validation.util.LoggerFactory;
-import org.hibernate.validation.util.GetClassLoader;
/**
* Resource bundle backed message interpolator.
@@ -59,10 +60,15 @@
private final Map<Locale, ResourceBundle> userBundlesMap = new ConcurrentHashMap<Locale, ResourceBundle>();
/**
- * Builtin resource bundles hashed against there locale.
+ * Built-in resource bundles hashed against there locale.
*/
private final Map<Locale, ResourceBundle> defaultBundlesMap = new ConcurrentHashMap<Locale, ResourceBundle>();
+ /**
+ * Step 1-3 of message interpolation can be cached. We do this in this map.
+ */
+ private final Map<LocalisedMessage, String> resolvedMessages = new WeakHashMap<LocalisedMessage, String>();
+
public ResourceBundleMessageInterpolator() {
this( null );
}
@@ -87,7 +93,7 @@
public String interpolate(String message, Context context) {
// probably no need for caching, but it could be done by parameters since the map
- // is immutable and uniquely built per Validation definition, the comparaison has to be based on == and not equals though
+ // is immutable and uniquely built per Validation definition, the comparison has to be based on == and not equals though
return interpolateMessage( message, context.getConstraintDescriptor().getAttributes(), defaultLocale );
}
@@ -96,11 +102,11 @@
}
/**
- * Runs the message interpolation according to alogrithm specified in JSR 303.
+ * Runs the message interpolation according to algorithm specified in JSR 303.
* <br/>
* Note:
* <br/>
- * Lookups in user bundles is recursive whereas lookups in default bundle are not!
+ * Look-ups in user bundles is recursive whereas look-ups in default bundle are not!
*
* @param message the message to interpolate
* @param annotationParameters the parameters of the annotation for which to interpolate this message
@@ -109,30 +115,36 @@
* @return the interpolated message.
*/
private String interpolateMessage(String message, Map<String, Object> annotationParameters, Locale locale) {
- ResourceBundle userResourceBundle = findUserResourceBundle( locale );
- ResourceBundle defaultResourceBundle = findDefaultResourceBundle( locale );
+ LocalisedMessage localisedMessage = new LocalisedMessage( message, locale );
+ String resolvedMessage = resolvedMessages.get( localisedMessage );
- String userBundleResolvedMessage;
- String resolvedMessage = message;
- boolean evaluatedDefaultBundleOnce = false;
- do {
- // search the user bundle recursive (step1)
- userBundleResolvedMessage = replaceVariables(
- resolvedMessage, userResourceBundle, locale, true
- );
+ // if the message is not already in the cache we have to run step 1-3 of the message resolution
+ if ( resolvedMessage == null ) {
+ ResourceBundle userResourceBundle = findUserResourceBundle( locale );
+ ResourceBundle defaultResourceBundle = findDefaultResourceBundle( locale );
- // exit condition - we have at least tried to vaidate against the default bundle and there was no
- // further replacements
- if ( evaluatedDefaultBundleOnce
- && !hasReplacementTakenPlace( userBundleResolvedMessage, resolvedMessage ) ) {
- break;
- }
+ String userBundleResolvedMessage;
+ resolvedMessage = message;
+ boolean evaluatedDefaultBundleOnce = false;
+ do {
+ // search the user bundle recursive (step1)
+ userBundleResolvedMessage = replaceVariables(
+ resolvedMessage, userResourceBundle, locale, true
+ );
- // search the default bundle non recursive (step2)
- resolvedMessage = replaceVariables( userBundleResolvedMessage, defaultResourceBundle, locale, false );
+ // exit condition - we have at least tried to validate against the default bundle and there was no
+ // further replacements
+ if ( evaluatedDefaultBundleOnce
+ && !hasReplacementTakenPlace( userBundleResolvedMessage, resolvedMessage ) ) {
+ break;
+ }
- evaluatedDefaultBundleOnce = true;
- } while ( true );
+ // search the default bundle non recursive (step2)
+ resolvedMessage = replaceVariables( userBundleResolvedMessage, defaultResourceBundle, locale, false );
+ evaluatedDefaultBundleOnce = true;
+ resolvedMessages.put( localisedMessage, resolvedMessage );
+ } while ( true );
+ }
// resolve annotation attributes (step 4)
resolvedMessage = replaceAnnotationAttributes( resolvedMessage, annotationParameters );
@@ -165,7 +177,7 @@
rb = loadBundle( classLoader, locale, USER_VALIDATION_MESSAGES + " not found by thread local classloader" );
}
if ( rb == null ) {
- action = GetClassLoader.fromClass(ResourceBundleMessageInterpolator.class);
+ action = GetClassLoader.fromClass( ResourceBundleMessageInterpolator.class );
classLoader = isSecured ? AccessController.doPrivileged( action ) : action.run();
rb = loadBundle(
classLoader,
@@ -286,4 +298,50 @@
escapedString = escapedString.replace( "$", "\\$" );
return escapedString;
}
+
+ class LocalisedMessage {
+ private final String message;
+ private final Locale locale;
+
+ LocalisedMessage(String message, Locale locale) {
+ this.message = message;
+ this.locale = locale;
+ }
+
+ public String getMessage() {
+ return message;
+ }
+
+ public Locale getLocale() {
+ return locale;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if ( this == o ) {
+ return true;
+ }
+ if ( o == null || getClass() != o.getClass() ) {
+ return false;
+ }
+
+ LocalisedMessage that = ( LocalisedMessage ) o;
+
+ if ( locale != null ? !locale.equals( that.locale ) : that.locale != null ) {
+ return false;
+ }
+ if ( message != null ? !message.equals( that.message ) : that.message != null ) {
+ return false;
+ }
+
+ return true;
+ }
+
+ @Override
+ public int hashCode() {
+ int result = message != null ? message.hashCode() : 0;
+ result = 31 * result + ( locale != null ? locale.hashCode() : 0 );
+ return result;
+ }
+ }
}
15 years, 4 months
Hibernate SVN: r17416 - in beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck: tests/constraints/groups/groupsequence and 5 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-25 11:25:56 -0400 (Tue, 25 Aug 2009)
New Revision: 17416
Added:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java
Removed:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Address.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Author.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Book.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Car.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/GroupTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Zebra.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MissingMandatoryElementTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java
Log:
made sure that tests verifying a interpolated message are not depending on a Locale. Fixed several typos
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Address.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Address.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Address.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -32,7 +32,7 @@
@Size(max = 50, message = "Street names cannot have more than {max} characters.")
private String street;
- @NotNull(groups = Default.class)
+ @NotNull(groups = Default.class, message = "Zipcode may not be null")
@Size(max = 5, message = "Zipcode cannot have more than {max} characters.")
private String zipcode;
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Author.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Author.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Author.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -30,7 +30,7 @@
@Size(min = 1, groups = First.class)
private String lastName;
- @Size(max = 20, groups = Last.class)
+ @Size(max = 20, groups = Last.class, message = "The company name can only have {max} characters")
private String company;
public String getFirstName() {
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Book.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Book.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Book.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -26,11 +26,11 @@
* @author Hardy Ferentschik
*/
public class Book {
- @NotNull(groups = First.class)
+ @NotNull(groups = First.class, message = "The book title cannot be null")
@Size(min = 1, groups = First.class)
private String title;
- @Size(max = 30, groups = Second.class)
+ @Size(max = 30, groups = Second.class, message = "The book's subtitle can only have {max} characters")
private String subtitle;
@Valid
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Car.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Car.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Car.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -29,7 +29,7 @@
@GroupSequence({ Car.class, Car.Test.class })
public class Car {
@Pattern(regexp = ".*", groups = Default.class)
- @Size(min = 2, max = 20, groups = Car.Test.class, message = "Car type has to be betweeb {min} and {max} characters.")
+ @Size(min = 2, max = 20, groups = Car.Test.class, message = "Car type has to be between {min} and {max} characters.")
private String type;
public String getType() {
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionTest.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/DefaultGroupRedefinitionTest.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -66,7 +66,7 @@
ConstraintViolation<Address> violation = constraintViolations.iterator().next();
assertConstraintViolation( violation, Address.class, null, "zipcode" );
- assertCorrectConstraintViolationMessages( constraintViolations, "may not be null" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "Zipcode may not be null" );
address.setZipcode( "41841" );
@@ -92,19 +92,19 @@
Set<ConstraintViolation<Car>> constraintViolations = validator.validate( car );
assertCorrectNumberOfViolations( constraintViolations, 1 );
assertCorrectConstraintViolationMessages(
- constraintViolations, "Car type has to be betweeb 2 and 20 characters."
+ constraintViolations, "Car type has to be between 2 and 20 characters."
);
constraintViolations = validator.validateProperty( car, "type" );
assertCorrectNumberOfViolations( constraintViolations, 1 );
assertCorrectConstraintViolationMessages(
- constraintViolations, "Car type has to be betweeb 2 and 20 characters."
+ constraintViolations, "Car type has to be between 2 and 20 characters."
);
constraintViolations = validator.validateValue( Car.class, "type", "A" );
assertCorrectNumberOfViolations( constraintViolations, 1 );
assertCorrectConstraintViolationMessages(
- constraintViolations, "Car type has to be betweeb 2 and 20 characters."
+ constraintViolations, "Car type has to be between 2 and 20 characters."
);
}
Copied: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java (from rev 17378, beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java)
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java (rev 0)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -0,0 +1,56 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 org.hibernate.jsr303.tck.tests.constraints.groups;
+
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class Dictionary extends Book {
+ @NotNull(groups = Translate.class)
+ @Size(min = 1, groups = Translate.class)
+ private String translatesTo;
+
+ @NotNull(groups = Translate.class)
+ @Size(min = 1, groups = Translate.class)
+ private String translatesFrom;
+
+ public String getTranslatesTo() {
+ return translatesTo;
+ }
+
+ public void setTranslatesTo(String translatesTo) {
+ this.translatesTo = translatesTo;
+ }
+
+ public String getTranslatesFrom() {
+ return translatesFrom;
+ }
+
+ public void setTranslatesFrom(String translatesFrom) {
+ this.translatesFrom = translatesFrom;
+ }
+
+ /**
+ * Translator related constraints
+ */
+ public interface Translate {
+ }
+}
\ No newline at end of file
Property changes on: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictionary.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
Deleted: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/Dictonary.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -1,56 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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 org.hibernate.jsr303.tck.tests.constraints.groups;
-
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-/**
- * @author Hardy Ferentschik
- */
-public class Dictonary extends Book {
- @NotNull(groups = Translate.class)
- @Size(min = 1, groups = Translate.class)
- private String translatesTo;
-
- @NotNull(groups = Translate.class)
- @Size(min = 1, groups = Translate.class)
- private String translatesFrom;
-
- public String getTranslatesTo() {
- return translatesTo;
- }
-
- public void setTranslatesTo(String translatesTo) {
- this.translatesTo = translatesTo;
- }
-
- public String getTranslatesFrom() {
- return translatesFrom;
- }
-
- public void setTranslatesFrom(String translatesFrom) {
- this.translatesFrom = translatesFrom;
- }
-
- /**
- * Translator related constraints
- */
- public interface Translate {
- }
-}
\ No newline at end of file
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/GroupTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/GroupTest.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/GroupTest.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -94,7 +94,7 @@
assertEquals(
constraintViolations.size(),
2,
- "There should be two violations against the explicit defualt group"
+ "There should be two violations against the explicit default group"
);
constraintViolations = validator.validate( user, User.Billable.class );
@@ -192,7 +192,7 @@
constraintViolations = validator.validate( book, First.class, Second.class, Last.class );
assertCorrectNumberOfViolations( constraintViolations, 1 );
- assertCorrectConstraintViolationMessages( constraintViolations, "size must be between 0 and 30" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "The book's subtitle can only have 30 characters" );
constraintViolation = constraintViolations.iterator().next();
assertEquals( constraintViolation.getRootBean(), book, "Wrong root entity" );
assertEquals( constraintViolation.getInvalidValue(), book.getSubtitle(), "Wrong value" );
@@ -203,8 +203,8 @@
constraintViolations = validator.validate( book, First.class, Second.class, Last.class );
constraintViolation = constraintViolations.iterator().next();
- assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
- assertEquals( constraintViolation.getMessage(), "size must be between 0 and 20" );
+ assertCorrectNumberOfViolations( constraintViolations, 1 );
+ assertCorrectConstraintViolationMessages( constraintViolations, "The company name can only have 20 characters" );
assertEquals( constraintViolation.getRootBean(), book, "Wrong root entity" );
assertEquals( constraintViolation.getInvalidValue(), author.getCompany(), "Wrong value" );
assertCorrectPropertyPaths( constraintViolations, "author.company" );
@@ -233,7 +233,7 @@
constraintViolations = validator.validate( book, Book.All.class );
assertCorrectNumberOfViolations( constraintViolations, 1 );
- assertCorrectConstraintViolationMessages( constraintViolations, "may not be null" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "The book title cannot be null" );
ConstraintViolation constraintViolation = constraintViolations.iterator().next();
assertEquals( constraintViolation.getRootBean(), book, "Wrong root entity" );
assertEquals( constraintViolation.getInvalidValue(), book.getTitle(), "Wrong value" );
@@ -246,7 +246,7 @@
assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
book.setSubtitle( "Revised Edition" );
- author.setCompany( "JBoss a divison of RedHat" );
+ author.setCompany( "JBoss a division of RedHat" );
constraintViolations = validator.validate( book, Book.All.class );
assertEquals( constraintViolations.size(), 1, "Wrong number of constraints" );
@@ -261,7 +261,7 @@
public void testGroupSequences() {
Validator validator = TestUtil.getValidatorUnderTest();
- Dictonary dictonary = new Dictonary();
+ Dictionary dictonary = new Dictionary();
dictonary.setTitle( "English - German" );
Author author = new Author();
author.setLastName( "-" );
@@ -269,7 +269,7 @@
author.setCompany( "Langenscheidt Publ." );
dictonary.setAuthor( author );
- Set<ConstraintViolation<Dictonary>> constraintViolations = validator.validate( dictonary, DefaultAlias.class );
+ Set<ConstraintViolation<Dictionary>> constraintViolations = validator.validate( dictonary, DefaultAlias.class );
assertEquals( constraintViolations.size(), 0, "Wrong number of constraints" );
}
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -67,7 +67,7 @@
validator.validate( entity, InvalidGroupSequence.class );
}
catch ( GroupDefinitionException e ) {
- System.err.println( e.getMessage() );
+ // success
}
}
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/ValidateTest.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -209,7 +209,7 @@
assertCorrectNumberOfViolations( constraintViolations, 2 );
ConstraintViolation constraintViolation = constraintViolations.iterator().next();
- assertEquals( "Everyone has a last name.", constraintViolation.getMessage(), "Wrong message" );
+ assertEquals( constraintViolation.getMessage(), "Everyone has a last name.", "Wrong message" );
assertEquals( constraintViolation.getRootBean(), clint, "Wrong root entity" );
assertEquals( constraintViolation.getInvalidValue(), morgan.getLastName(), "Wrong value" );
assertCorrectPropertyPaths(
@@ -241,7 +241,7 @@
Set<ConstraintViolation<Actor>> constraintViolations = validator.validate( clint );
assertCorrectNumberOfViolations( constraintViolations, 2 );
ConstraintViolation constraintViolation = constraintViolations.iterator().next();
- assertEquals( "Everyone has a last name.", constraintViolation.getMessage(), "Wrong message" );
+ assertEquals( constraintViolation.getMessage(), "Everyone has a last name.", "Wrong message" );
assertEquals( constraintViolation.getRootBean(), clint, "Wrong root entity" );
assertEquals( constraintViolation.getInvalidValue(), morgan.getLastName(), "Wrong value" );
assertCorrectPropertyPaths(
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationTest.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/GraphNavigationTest.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -148,7 +148,7 @@
Validator validator = TestUtil.getValidatorUnderTest();
Set<ConstraintViolation<MultiCage>> constraintViolations = validator.validate( cage );
assertCorrectNumberOfViolations( constraintViolations, 2 );
- assertCorrectConstraintViolationMessages( constraintViolations, "may not be null", "may not be null" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "A zebra needs a name", "A zebra needs a name" );
}
@Test
@@ -163,7 +163,7 @@
Validator validator = TestUtil.getValidatorUnderTest();
Set<ConstraintViolation<GameReserve<Zebra>>> constraintViolations = validator.validate( reserve );
assertCorrectNumberOfViolations( constraintViolations, 2 );
- assertCorrectConstraintViolationMessages( constraintViolations, "may not be null", "may not be null" );
+ assertCorrectConstraintViolationMessages( constraintViolations, "A zebra needs a name", "A zebra needs a name" );
}
@Test
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Zebra.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Zebra.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/validation/graphnavigation/Zebra.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
@@ -29,7 +29,7 @@
this.name = name;
}
- @NotNull
+ @NotNull(message = "A zebra needs a name")
public String getName() {
return name;
}
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/CreditCard.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -24,7 +24,7 @@
*/
public class CreditCard {
- @Pattern(regexp = "[0-9]+", message = "Not a credit casrd number.")
+ @Pattern(regexp = "[0-9]+", message = "Not a credit card number.")
private String number;
public String getNumber() {
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/XmlConfigurationTest.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -205,7 +205,7 @@
Set<ConstraintViolation<User>> constraintViolations = validator.validate( user );
assertCorrectNumberOfViolations( constraintViolations, 1 );
- assertCorrectConstraintViolationMessages( constraintViolations, "Not a credit casrd number." );
+ assertCorrectConstraintViolationMessages( constraintViolations, "Not a credit card number." );
card.setNumber( "1234567890" );
constraintViolations = validator.validate( user );
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MissingMandatoryElementTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MissingMandatoryElementTest.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/xmlconfiguration/constraintdeclaration/MissingMandatoryElementTest.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -47,11 +47,10 @@
public void testMissingMandatoryElementInConstraintDeclaration() {
try {
TestUtil.getValidatorUnderTest();
- fail("Creating the validator should have failed since the constraint declaration in xml is incomplete.");
+ fail( "Creating the validator should have failed since the constraint declaration in xml is incomplete." );
}
catch ( ValidationException e ) {
// success
- System.err.println( e.getMessage() );
}
}
}
\ No newline at end of file
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java 2009-08-25 15:20:45 UTC (rev 17415)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/util/TestUtil.java 2009-08-25 15:25:56 UTC (rev 17416)
@@ -47,7 +47,7 @@
*/
public final class TestUtil {
- private static String VALIDIDATION_PROVIDER_TEST_CLASS = "validation.provider";
+ private static String VALIDATION_PROVIDER_TEST_CLASS = "validation.provider";
private static ValidationProvider<?> validationProviderUnderTest;
@@ -111,7 +111,7 @@
actualMessages.remove( expectedMessage );
}
assertTrue(
- actualMessages.isEmpty(), "Actual messages contained more messages as specidied expected messages"
+ actualMessages.isEmpty(), "Actual messages contained more messages as specified expected messages"
);
}
@@ -251,28 +251,28 @@
private static <U extends ValidationProvider<?>> void instantiateValidationProviderUnderTest() {
- String validatorproviderClassName = System.getProperty( VALIDIDATION_PROVIDER_TEST_CLASS );
- if ( validatorproviderClassName == null ) {
+ String validatorProviderClassName = System.getProperty( VALIDATION_PROVIDER_TEST_CLASS );
+ if ( validatorProviderClassName == null ) {
throw new RuntimeException(
- "The test harness must specify the class name of the validation provider under test. Set system property '" + VALIDIDATION_PROVIDER_TEST_CLASS + "'"
+ "The test harness must specify the class name of the validation provider under test. Set system property '" + VALIDATION_PROVIDER_TEST_CLASS + "'"
);
}
Class<U> providerClass;
try {
@SuppressWarnings("unchecked")
- Class<U> tmpClazz = ( Class<U> ) TestUtil.class.getClassLoader().loadClass( validatorproviderClassName );
+ Class<U> tmpClazz = ( Class<U> ) TestUtil.class.getClassLoader().loadClass( validatorProviderClassName );
providerClass = tmpClazz;
}
catch ( ClassNotFoundException e ) {
- throw new RuntimeException( "Unable to load " + validatorproviderClassName );
+ throw new RuntimeException( "Unable to load " + validatorProviderClassName );
}
try {
validationProviderUnderTest = providerClass.newInstance();
}
catch ( Exception e ) {
- throw new RuntimeException( "Unable to instantiate " + validatorproviderClassName );
+ throw new RuntimeException( "Unable to instantiate " + validatorProviderClassName );
}
}
@@ -285,7 +285,7 @@
*/
private static final Pattern pathPattern = Pattern.compile( "(\\w+)(\\[(\\w*)\\])?(\\.(.*))*" );
- private static final String PROPERTY_PATH_SEPERATOR = ".";
+ private static final String PROPERTY_PATH_SEPARATOR = ".";
private final List<Node> nodeList;
@@ -328,7 +328,7 @@
Node node = iter.next();
builder.append( node.toString() );
if ( iter.hasNext() ) {
- builder.append( PROPERTY_PATH_SEPERATOR );
+ builder.append( PROPERTY_PATH_SEPARATOR );
}
}
return builder.toString();
15 years, 4 months
Hibernate SVN: r17415 - core/trunk/cache-infinispan.
by hibernate-commits@lists.jboss.org
Author: manik.surtani(a)jboss.com
Date: 2009-08-25 11:20:45 -0400 (Tue, 25 Aug 2009)
New Revision: 17415
Modified:
core/trunk/cache-infinispan/pom.xml
Log:
[ISPN-6] Updated dependency of test suite to Infinispan 4.0.0.BETA1
Modified: core/trunk/cache-infinispan/pom.xml
===================================================================
--- core/trunk/cache-infinispan/pom.xml 2009-08-25 15:05:06 UTC (rev 17414)
+++ core/trunk/cache-infinispan/pom.xml 2009-08-25 15:20:45 UTC (rev 17415)
@@ -17,7 +17,7 @@
<description>Integration of Hibernate with Infinispan</description>
<properties>
- <version.infinispan>4.0.0-SNAPSHOT</version.infinispan>
+ <version.infinispan>4.0.0.BETA1</version.infinispan>
<version.hsqldb>1.8.0.2</version.hsqldb>
<version.cglib>2.2</version.cglib>
<version.javassist>3.4.GA</version.javassist>
15 years, 4 months
Hibernate SVN: r17414 - validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/util.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-08-25 11:05:06 -0400 (Tue, 25 Aug 2009)
New Revision: 17414
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/util/LazyValidatorFactory.java
Log:
Implement a better double-check null.
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/util/LazyValidatorFactory.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/util/LazyValidatorFactory.java 2009-08-25 14:39:26 UTC (rev 17413)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/util/LazyValidatorFactory.java 2009-08-25 15:05:06 UTC (rev 17414)
@@ -50,41 +50,42 @@
this.configuration = configuration;
}
- public Validator getValidator() {
- if ( delegate == null ) {
- initFactory();
+ private ValidatorFactory getDelegate() {
+ ValidatorFactory result = delegate;
+ if (result == null) {
+ synchronized ( this ) {
+ result = delegate;
+ if (result == null) {
+ delegate = result = initFactory();
+ }
+ }
}
- return delegate.getValidator();
+ return result;
}
+ public Validator getValidator() {
+ return getDelegate().getValidator();
+ }
+
//we can initialize several times that's ok
- private void initFactory() {
+ private ValidatorFactory initFactory() {
if ( configuration == null ) {
- delegate = Validation.buildDefaultValidatorFactory();
+ return Validation.buildDefaultValidatorFactory();
}
else {
- delegate = configuration.buildValidatorFactory();
+ return configuration.buildValidatorFactory();
}
}
public ValidatorContext usingContext() {
- if ( delegate == null ) {
- initFactory();
- }
- return delegate.usingContext();
+ return getDelegate().usingContext();
}
public MessageInterpolator getMessageInterpolator() {
- if ( delegate == null ) {
- initFactory();
- }
- return delegate.getMessageInterpolator();
+ return getDelegate().getMessageInterpolator();
}
public <T> T unwrap(Class<T> clazz) {
- if ( delegate == null ) {
- initFactory();
- }
- return delegate.unwrap( clazz );
+ return getDelegate().unwrap( clazz );
}
}
15 years, 4 months
Hibernate SVN: r17413 - in validator/trunk: hibernate-validator/src/main/java/org/hibernate/validation/engine and 4 other directories.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-25 10:39:26 -0400 (Tue, 25 Aug 2009)
New Revision: 17413
Added:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidator.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorConfiguration.java
Removed:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidationProvider.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/HibernateValidatorConfiguration.java
Modified:
validator/trunk/hibernate-validator-tck-runner/pom.xml
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConfigurationImpl.java
validator/trunk/hibernate-validator/src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/util/TestUtil.java
Log:
HV-211
Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidationProvider.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidationProvider.java 2009-08-25 14:38:28 UTC (rev 17412)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidationProvider.java 2009-08-25 14:39:26 UTC (rev 17413)
@@ -1,49 +0,0 @@
-// $Id$
-/*
-* JBoss, Home of Professional Open Source
-* Copyright 2008, Red Hat Middleware LLC, and individual contributors
-* by the @authors tag. See the copyright.txt in the distribution for a
-* full listing of individual contributors.
-*
-* 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 org.hibernate.validation;
-
-import javax.validation.Configuration;
-import javax.validation.ValidatorFactory;
-import javax.validation.spi.BootstrapState;
-import javax.validation.spi.ConfigurationState;
-import javax.validation.spi.ValidationProvider;
-
-import org.hibernate.validation.engine.ConfigurationImpl;
-import org.hibernate.validation.engine.HibernateValidatorConfiguration;
-import org.hibernate.validation.engine.ValidatorFactoryImpl;
-
-/**
- * Default implementation of <code>ValidationProvider</code> within Hibernate validator.
- *
- * @author Emmanuel Bernard
- * @author Hardy Ferentschik
- */
-public class HibernateValidationProvider implements ValidationProvider<HibernateValidatorConfiguration> {
-
- public HibernateValidatorConfiguration createSpecializedConfiguration(BootstrapState state) {
- return HibernateValidatorConfiguration.class.cast( new ConfigurationImpl( this ) );
- }
-
- public Configuration<?> createGenericConfiguration(BootstrapState state) {
- return new ConfigurationImpl( state );
- }
-
- public ValidatorFactory buildValidatorFactory(ConfigurationState configurationState) {
- return new ValidatorFactoryImpl( configurationState );
- }
-}
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidator.java (from rev 17398, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidationProvider.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidator.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidator.java 2009-08-25 14:39:26 UTC (rev 17413)
@@ -0,0 +1,49 @@
+// $Id$
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2008, Red Hat Middleware LLC, and individual contributors
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* 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 org.hibernate.validation;
+
+import javax.validation.Configuration;
+import javax.validation.ValidatorFactory;
+import javax.validation.spi.BootstrapState;
+import javax.validation.spi.ConfigurationState;
+import javax.validation.spi.ValidationProvider;
+
+import org.hibernate.validation.engine.ConfigurationImpl;
+import org.hibernate.validation.engine.ValidatorConfiguration;
+import org.hibernate.validation.engine.ValidatorFactoryImpl;
+
+/**
+ * Default implementation of <code>ValidationProvider</code> within Hibernate validator.
+ *
+ * @author Emmanuel Bernard
+ * @author Hardy Ferentschik
+ */
+public class HibernateValidator implements ValidationProvider<ValidatorConfiguration> {
+
+ public ValidatorConfiguration createSpecializedConfiguration(BootstrapState state) {
+ return ValidatorConfiguration.class.cast( new ConfigurationImpl( this ) );
+ }
+
+ public Configuration<?> createGenericConfiguration(BootstrapState state) {
+ return new ConfigurationImpl( state );
+ }
+
+ public ValidatorFactory buildValidatorFactory(ConfigurationState configurationState) {
+ return new ValidatorFactoryImpl( configurationState );
+ }
+}
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/HibernateValidator.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConfigurationImpl.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConfigurationImpl.java 2009-08-25 14:38:28 UTC (rev 17412)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ConfigurationImpl.java 2009-08-25 14:39:26 UTC (rev 17413)
@@ -45,7 +45,7 @@
* @author Emmanuel Bernard
* @author Hardy Ferentschik
*/
-public class ConfigurationImpl implements HibernateValidatorConfiguration, ConfigurationState {
+public class ConfigurationImpl implements ValidatorConfiguration, ConfigurationState {
static {
Version.touch();
@@ -80,7 +80,7 @@
validationBootstrapParameters.provider = provider;
}
- public HibernateValidatorConfiguration ignoreXmlConfiguration() {
+ public ValidatorConfiguration ignoreXmlConfiguration() {
ignoreXmlConfiguration = true;
return this;
}
@@ -100,12 +100,12 @@
return this;
}
- public HibernateValidatorConfiguration addMapping(InputStream stream) {
+ public ValidatorConfiguration addMapping(InputStream stream) {
validationBootstrapParameters.mappings.add( stream );
return this;
}
- public HibernateValidatorConfiguration addProperty(String name, String value) {
+ public ValidatorConfiguration addProperty(String name, String value) {
if ( value != null ) {
validationBootstrapParameters.configProperties.put( name, value );
}
Deleted: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/HibernateValidatorConfiguration.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/HibernateValidatorConfiguration.java 2009-08-25 14:38:28 UTC (rev 17412)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/HibernateValidatorConfiguration.java 2009-08-25 14:39:26 UTC (rev 17413)
@@ -1,12 +0,0 @@
-package org.hibernate.validation.engine;
-
-import javax.validation.Configuration;
-
-/**
- * Uniquely identify Hibernate Validator in the Bean Validation bootstrap strategy
- * Also contains Hibernate Validator specific configurations
- *
- * @author Emmanuel Bernard
- */
-public interface HibernateValidatorConfiguration extends Configuration<HibernateValidatorConfiguration> {
-}
Copied: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorConfiguration.java (from rev 17398, validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/HibernateValidatorConfiguration.java)
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorConfiguration.java (rev 0)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorConfiguration.java 2009-08-25 14:39:26 UTC (rev 17413)
@@ -0,0 +1,12 @@
+package org.hibernate.validation.engine;
+
+import javax.validation.Configuration;
+
+/**
+ * Uniquely identify Hibernate Validator in the Bean Validation bootstrap strategy
+ * Also contains Hibernate Validator specific configurations
+ *
+ * @author Emmanuel Bernard
+ */
+public interface ValidatorConfiguration extends Configuration<ValidatorConfiguration> {
+}
Property changes on: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/engine/ValidatorConfiguration.java
___________________________________________________________________
Name: svn:keywords
+ Id
Modified: validator/trunk/hibernate-validator/src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider
===================================================================
--- validator/trunk/hibernate-validator/src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider 2009-08-25 14:38:28 UTC (rev 17412)
+++ validator/trunk/hibernate-validator/src/main/resources/META-INF/services/javax.validation.spi.ValidationProvider 2009-08-25 14:39:26 UTC (rev 17413)
@@ -1 +1 @@
-org.hibernate.validation.HibernateValidationProvider
\ No newline at end of file
+org.hibernate.validation.HibernateValidator
\ No newline at end of file
Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java 2009-08-25 14:38:28 UTC (rev 17412)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/bootstrap/ValidationTest.java 2009-08-25 14:39:26 UTC (rev 17413)
@@ -35,9 +35,9 @@
import org.hibernate.validation.constraints.impl.NotNullValidator;
import org.hibernate.validation.engine.ConfigurationImpl;
import org.hibernate.validation.engine.ConstraintValidatorFactoryImpl;
-import org.hibernate.validation.engine.HibernateValidatorConfiguration;
+import org.hibernate.validation.engine.ValidatorConfiguration;
import org.hibernate.validation.engine.ValidatorFactoryImpl;
-import org.hibernate.validation.HibernateValidationProvider;
+import org.hibernate.validation.HibernateValidator;
/**
* Tests the Bean Validation bootstrapping.
@@ -48,8 +48,8 @@
@Test
public void testBootstrapAsServiceWithBuilder() {
- HibernateValidatorConfiguration configuration = Validation
- .byProvider( HibernateValidationProvider.class )
+ ValidatorConfiguration configuration = Validation
+ .byProvider( HibernateValidator.class )
.configure();
assertDefaultBuilderAndFactory( configuration );
}
Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/util/TestUtil.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/util/TestUtil.java 2009-08-25 14:38:28 UTC (rev 17412)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validation/util/TestUtil.java 2009-08-25 14:39:26 UTC (rev 17413)
@@ -36,8 +36,8 @@
import static org.testng.Assert.assertTrue;
import static org.testng.FileAssert.fail;
-import org.hibernate.validation.HibernateValidationProvider;
-import org.hibernate.validation.engine.HibernateValidatorConfiguration;
+import org.hibernate.validation.HibernateValidator;
+import org.hibernate.validation.engine.ValidatorConfiguration;
import org.hibernate.validation.engine.PathImpl;
/**
@@ -55,8 +55,8 @@
public static Validator getValidator() {
if ( hibernateValidator == null ) {
- HibernateValidatorConfiguration configuration = Validation
- .byProvider( HibernateValidationProvider.class )
+ ValidatorConfiguration configuration = Validation
+ .byProvider( HibernateValidator.class )
.configure();
hibernateValidator = configuration.buildValidatorFactory().getValidator();
}
@@ -73,8 +73,8 @@
public static Validator getValidatorWithCustomConfiguration(String path) {
Thread.currentThread().setContextClassLoader( new CustomValidationXmlClassLoader( path ) );
- HibernateValidatorConfiguration configuration = Validation
- .byProvider( HibernateValidationProvider.class )
+ ValidatorConfiguration configuration = Validation
+ .byProvider( HibernateValidator.class )
.configure();
return configuration.buildValidatorFactory().getValidator();
}
@@ -85,8 +85,8 @@
public static Validator getValidatorIgnoringValidationXml() {
Thread.currentThread().setContextClassLoader( new IgnoringValidationXmlClassLoader() );
- HibernateValidatorConfiguration configuration = Validation
- .byProvider( HibernateValidationProvider.class )
+ ValidatorConfiguration configuration = Validation
+ .byProvider( HibernateValidator.class )
.configure();
return configuration.buildValidatorFactory().getValidator();
}
Modified: validator/trunk/hibernate-validator-tck-runner/pom.xml
===================================================================
--- validator/trunk/hibernate-validator-tck-runner/pom.xml 2009-08-25 14:38:28 UTC (rev 17412)
+++ validator/trunk/hibernate-validator-tck-runner/pom.xml 2009-08-25 14:39:26 UTC (rev 17413)
@@ -43,7 +43,7 @@
<properties>
<jboss.home>/opt/java/jboss-5</jboss.home>
- <validation.provider>org.hibernate.validation.HibernateValidationProvider</validation.provider>
+ <validation.provider>org.hibernate.validation.HibernateValidator</validation.provider>
<remote.debug />
</properties>
15 years, 4 months
Hibernate SVN: r17412 - beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-08-25 10:38:28 -0400 (Tue, 25 Aug 2009)
New Revision: 17412
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java
Log:
Removed unused interface
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java 2009-08-25 14:06:14 UTC (rev 17411)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/groups/groupsequence/SequenceResolutionTest.java 2009-08-25 14:38:28 UTC (rev 17412)
@@ -118,9 +118,6 @@
interface Third {
}
- interface FirstAndSecond extends First, Second {
- }
-
@GroupSequence({ First.class, Second.class, Third.class })
interface All {
}
15 years, 4 months