Author: epbernard
Date: 2008-11-05 14:20:28 -0500 (Wed, 05 Nov 2008)
New Revision: 15520
Modified:
validator/trunk/validation-api/src/main/java/javax/validation/ConstraintViolation.java
validator/trunk/validation-api/src/main/java/javax/validation/Validator.java
validator/trunk/validation-api/src/main/java/javax/validation/ValidatorFactoryBuilder.java
Log:
BVAL-23 Validator<T> is thread-safe
BVAL-49 *Descriptor returned marked as immutable
Modified:
validator/trunk/validation-api/src/main/java/javax/validation/ConstraintViolation.java
===================================================================
---
validator/trunk/validation-api/src/main/java/javax/validation/ConstraintViolation.java 2008-11-05
09:23:49 UTC (rev 15519)
+++
validator/trunk/validation-api/src/main/java/javax/validation/ConstraintViolation.java 2008-11-05
19:20:28 UTC (rev 15520)
@@ -74,7 +74,9 @@
Set<String> getGroups();
/**
- * Constraint metadata reported to fail
+ * Constraint metadata reported to fail.
+ * The returned instance is immutable.
+ *
* @return constraint metadata
*/
ConstraintDescriptor getConstraintDescriptor();
Modified: validator/trunk/validation-api/src/main/java/javax/validation/Validator.java
===================================================================
---
validator/trunk/validation-api/src/main/java/javax/validation/Validator.java 2008-11-05
09:23:49 UTC (rev 15519)
+++
validator/trunk/validation-api/src/main/java/javax/validation/Validator.java 2008-11-05
19:20:28 UTC (rev 15520)
@@ -22,6 +22,7 @@
/**
* Validate a given object type.
+ * Implementations of this interface must be thread-safe
*
* @author Emmanuel Bernard
* @author Hardy Ferentschik
@@ -77,13 +78,17 @@
boolean hasConstraints();
/**
- * return the class level constraints
+ * Return the class level constraints
+ * The returned object (and associated objects including ConstraintDescriptors)
+ * are immutable.
*/
BeanDescriptor getConstraintsForClass();
/**
- * return the property level constraints for a given propertyName
+ * Return the property level constraints for a given propertyName
* or null if either the property does not exist or has no constraint
+ * The returned object (and associated objects including ConstraintDescriptors)
+ * are immutable.
*/
PropertyDescriptor getConstraintsForProperty(String propertyName);
Modified:
validator/trunk/validation-api/src/main/java/javax/validation/ValidatorFactoryBuilder.java
===================================================================
---
validator/trunk/validation-api/src/main/java/javax/validation/ValidatorFactoryBuilder.java 2008-11-05
09:23:49 UTC (rev 15519)
+++
validator/trunk/validation-api/src/main/java/javax/validation/ValidatorFactoryBuilder.java 2008-11-05
19:20:28 UTC (rev 15520)
@@ -43,7 +43,7 @@
* find the first provider matching it
* - otherwise, use the first provider returned by the ValidationProviderResolver
* <p/>
- * Implementations are not meant to be thread safe
+ * Implementations are not meant to be thread-safe
*
* @author Emmanuel Bernard
*/
Show replies by date