Message could not be delivered
by Post Office
Dear user hibernate-commits(a)lists.jboss.org,
Your account was used to send a large amount of junk email during the last week.
Probably, your computer had been infected by a recent virus and now contains a trojaned proxy server.
Please follow our instructions in order to keep your computer safe.
Sincerely yours,
The lists.jboss.org support team.
15 years, 4 months
Hibernate SVN: r17220 - validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-07-29 22:37:09 -0400 (Wed, 29 Jul 2009)
New Revision: 17220
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java
Log:
cleaner log
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java 2009-07-30 02:27:53 UTC (rev 17219)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java 2009-07-30 02:37:09 UTC (rev 17220)
@@ -206,7 +206,7 @@
private ValidationConfigType getValidationConfig() {
InputStream inputStream = getInputStreamForPath( VALIDATION_XML_FILE );
if ( inputStream == null ) {
- log.info( "No {} found. Using annotation based configuration only!", VALIDATION_XML_FILE );
+ log.debug( "No {} found. Using annotation based configuration only", VALIDATION_XML_FILE );
return null;
}
15 years, 4 months
Hibernate SVN: r17219 - validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-07-29 22:27:53 -0400 (Wed, 29 Jul 2009)
New Revision: 17219
Modified:
beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation.xml
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java
Log:
HV-195 be permissive to heading '/' on mapping file names
Modified: beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation.xml
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation.xml 2009-07-30 02:15:39 UTC (rev 17218)
+++ beanvalidation/trunk/validation-tck/src/main/resources/org/hibernate/jsr303/tck/tests/xmlconfiguration/validation.xml 2009-07-30 02:27:53 UTC (rev 17219)
@@ -2,7 +2,7 @@
<validation-config xmlns="http://jboss.org/xml/ns/javax/validation/configuration"
xsi:schemaLocation="http://jboss.org/xml/ns/javax/validation/configuration validation-configuration-1.0.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
- <constraint-mapping>/org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints.xml</constraint-mapping>
+ <constraint-mapping>org/hibernate/jsr303/tck/tests/xmlconfiguration/order-constraints.xml</constraint-mapping>
<constraint-mapping>org/hibernate/jsr303/tck/tests/xmlconfiguration/user-constraints.xml</constraint-mapping>
<property name="javax.validation.test">foobar</property>
</validation-config>
\ No newline at end of file
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java 2009-07-30 02:15:39 UTC (rev 17218)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java 2009-07-30 02:27:53 UTC (rev 17219)
@@ -230,6 +230,11 @@
}
private InputStream getInputStreamForPath(String path) {
+ //TODO not sure it's the right thing to do (ie removing '/'
+ //remove heading '/'
+ if ( path.startsWith( "/" ) ) {
+ path = path.substring( 1 );
+ }
// try the context class loader first
ClassLoader loader = Thread.currentThread().getContextClassLoader();
boolean isContextCL = true;
15 years, 4 months
Hibernate SVN: r17218 - validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-07-29 22:15:39 -0400 (Wed, 29 Jul 2009)
New Revision: 17218
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java
Log:
HV-194 avoid the NPE when loading XML resources. Also do not use class.getResourceAsStream as the resource name alterations are not the ones expected
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java 2009-07-30 01:47:31 UTC (rev 17217)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/xml/ValidationXmlParser.java 2009-07-30 02:15:39 UTC (rev 17218)
@@ -231,11 +231,18 @@
private InputStream getInputStreamForPath(String path) {
// try the context class loader first
- InputStream inputStream = Thread.currentThread().getContextClassLoader().getResourceAsStream( path );
+ ClassLoader loader = Thread.currentThread().getContextClassLoader();
+ boolean isContextCL = true;
+ if (loader == null) {
+ log.debug( "No default context class loader, fallbacking to Bean Validation's loader" );
+ loader = ValidationXmlParser.class.getClassLoader();
+ isContextCL = false;
+ }
+ InputStream inputStream = loader.getResourceAsStream( path );
// try the current class loader
- if ( inputStream == null ) {
- inputStream = this.getClass().getResourceAsStream( path );
+ if ( isContextCL && inputStream == null ) {
+ inputStream = ValidationXmlParser.class.getClassLoader().getResourceAsStream( path );
}
return inputStream;
}
15 years, 4 months
Hibernate SVN: r17217 - beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/builtinconstraints and 2 other directories.
by hibernate-commits@lists.jboss.org
Author: epbernard
Date: 2009-07-29 21:47:31 -0400 (Wed, 29 Jul 2009)
New Revision: 17217
Modified:
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java
beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/builtinconstraints/BuiltinConstraintsTest.java
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/FrenchZipcode.java
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/ConstraintDescriptorImpl.java
Log:
HV-193 @overridesAttribute.index starts at 0 like any other array index in Java
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java 2009-07-29 15:22:25 UTC (rev 17216)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/bootstrap/validationxml/ValidationXmlBootstrapTest.java 2009-07-30 01:47:31 UTC (rev 17217)
@@ -40,7 +40,7 @@
public void testWrongProviderConfiguredInValidationXml() {
try {
Validation.buildDefaultValidatorFactory();
- fail( "valiation.xml contains a invalid provider. Validation.buildDefaultValidatorFactory() should have failed." );
+ fail( "validation.xml contains a invalid provider. Validation.buildDefaultValidatorFactory() should have failed." );
}
catch ( ValidationException e ) {
// success
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/builtinconstraints/BuiltinConstraintsTest.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/builtinconstraints/BuiltinConstraintsTest.java 2009-07-29 15:22:25 UTC (rev 17216)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/builtinconstraints/BuiltinConstraintsTest.java 2009-07-30 01:47:31 UTC (rev 17217)
@@ -57,7 +57,7 @@
import static org.hibernate.jsr303.tck.util.TestUtil.assertCorrectPropertyPaths;
/**
- * Tests for built-in constraints. Basically juyst checks the availabiltiy of the build-in constraints.
+ * Tests for built-in constraints. Basically just checks the availabiltiy of the build-in constraints.
*
* @author Hardy Ferentschik
*/
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-07-29 15:22:25 UTC (rev 17216)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/ConstraintCompositionTest.java 2009-07-30 01:47:31 UTC (rev 17217)
@@ -213,15 +213,24 @@
BeanDescriptor descriptor = validator.getConstraintsForClass( FrenchAddress.class );
Set<ConstraintDescriptor<?>> constraintDescriptors = descriptor.getConstraintsForProperty( "zipCode" )
.getConstraintDescriptors();
+ boolean findPattern = checkForAppropriateAnnotation( constraintDescriptors );
+ assertTrue( findPattern, "Could not find @Pattern in composing constraints" );
+ }
+
+ private boolean checkForAppropriateAnnotation(Set<ConstraintDescriptor<?>> constraintDescriptors) {
+ boolean findPattern = false;
for ( ConstraintDescriptor<?> constraintDescriptor : constraintDescriptors ) {
Annotation ann = constraintDescriptor.getAnnotation();
if ( Pattern.class.getName().equals( ann.annotationType().getName() ) ) {
String regexp = ( ( Pattern ) ann ).regexp();
- if ( regexp.equals( "\\d*" ) || regexp.equals( "....." ) ) {
- fail( "The regular expression should attributes are defined in the composing constraint." );
+ if ( regexp.equals( "bar" ) ) {
+ fail( "The regular expression attributes are defined in the composing constraint." );
}
+ findPattern = true;
}
+ findPattern |= checkForAppropriateAnnotation( constraintDescriptor.getComposingConstraints() );
}
+ return findPattern;
}
@Test
Modified: beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/FrenchZipcode.java
===================================================================
--- beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/FrenchZipcode.java 2009-07-29 15:22:25 UTC (rev 17216)
+++ beanvalidation/trunk/validation-tck/src/main/java/org/hibernate/jsr303/tck/tests/constraints/constraintcomposition/FrenchZipcode.java 2009-07-30 01:47:31 UTC (rev 17217)
@@ -58,6 +58,6 @@
@OverridesAttribute(constraint = Size.class, name = "message")
String sizeMessage() default "A french zip code has a length of 5";
- @OverridesAttribute(constraint = Pattern.class, name = "regexp", constraintIndex = 2)
+ @OverridesAttribute(constraint = Pattern.class, name = "regexp", constraintIndex = 1)
String regex() default "\\d*";
}
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-07-29 15:22:25 UTC (rev 17216)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validation/metadata/ConstraintDescriptorImpl.java 2009-07-30 01:47:31 UTC (rev 17217)
@@ -338,7 +338,7 @@
}
else if ( constraintHelper.isMultiValueConstraint( declaredAnnotation ) ) {
List<Annotation> multiValueConstraints = constraintHelper.getMultiValueConstraints( declaredAnnotation );
- int index = 1;
+ int index = 0;
for ( Annotation constraintAnnotation : multiValueConstraints ) {
ConstraintDescriptorImpl<?> descriptor = createComposingConstraintDescriptor(
constraintAnnotation, overrideParameters, index
15 years, 4 months
Hibernate SVN: r17216 - core/branches/Branch_3_2_4_SP1_CP.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-07-29 11:22:25 -0400 (Wed, 29 Jul 2009)
New Revision: 17216
Removed:
core/branches/Branch_3_2_4_SP1_CP/test-stliu.txt
Log:
write access test
Deleted: core/branches/Branch_3_2_4_SP1_CP/test-stliu.txt
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test-stliu.txt 2009-07-29 15:21:44 UTC (rev 17215)
+++ core/branches/Branch_3_2_4_SP1_CP/test-stliu.txt 2009-07-29 15:22:25 UTC (rev 17216)
@@ -1 +0,0 @@
-test
15 years, 4 months
Hibernate SVN: r17215 - core/branches/Branch_3_2_4_SP1_CP.
by hibernate-commits@lists.jboss.org
Author: stliu
Date: 2009-07-29 11:21:44 -0400 (Wed, 29 Jul 2009)
New Revision: 17215
Added:
core/branches/Branch_3_2_4_SP1_CP/test-stliu.txt
Log:
write access test
Added: core/branches/Branch_3_2_4_SP1_CP/test-stliu.txt
===================================================================
--- core/branches/Branch_3_2_4_SP1_CP/test-stliu.txt (rev 0)
+++ core/branches/Branch_3_2_4_SP1_CP/test-stliu.txt 2009-07-29 15:21:44 UTC (rev 17215)
@@ -0,0 +1 @@
+test
15 years, 4 months