Hibernate SVN: r17576 - in validator/trunk/hibernate-validator/src: test/java/org/hibernate/validator/constraints and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-09-28 12:09:36 -0400 (Mon, 28 Sep 2009)
New Revision: 17576
Added:
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Cloneable.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/CloneableConstraintValidator.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Object.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/ObjectConstraintValidator.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Serializable.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SerializableConstraintValidator.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SubType.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperType.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperTypeArray.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperTypeArrayValidator.java
Modified:
validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintTree.java
validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/ValidatorResolutionTest.java
Log:
HV-233 Added tests for section 4.10.3 Subtyping among array types
Modified: validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintTree.java
===================================================================
--- validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintTree.java 2009-09-28 13:33:56 UTC (rev 17575)
+++ validator/trunk/hibernate-validator/src/main/java/org/hibernate/validator/engine/ConstraintTree.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -220,7 +220,17 @@
private void verifyResolveWasUnique(Type valueClass, List<Type> assignableClasses) {
if ( assignableClasses.size() == 0 ) {
- throw new UnexpectedTypeException( "No validator could be found for type: " + valueClass );
+ String className = valueClass.toString();
+ if ( valueClass instanceof Class ) {
+ Class<?> clazz = ( Class<?> ) valueClass;
+ if ( clazz.isArray() ) {
+ className = clazz.getComponentType().toString() + "[]";
+ }
+ else {
+ className = clazz.getName();
+ }
+ }
+ throw new UnexpectedTypeException( "No validator could be found for type: " + className );
}
else if ( assignableClasses.size() > 1 ) {
StringBuilder builder = new StringBuilder();
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Cloneable.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Cloneable.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Cloneable.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,44 @@
+// $Id: Positive.java 17421 2009-08-26 12:25:39Z hardy.ferentschik $
+/*
+* 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.validator.constraints;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Constraint(validatedBy = { CloneableConstraintValidator.class })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE })
+@Retention(RUNTIME)
+@Documented
+public @interface Cloneable {
+ public abstract String message() default "{org.hibernate.validator.constraints.Cloneable.message}";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/CloneableConstraintValidator.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/CloneableConstraintValidator.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/CloneableConstraintValidator.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,34 @@
+// $Id: PositiveConstraintValidator.java 17421 2009-08-26 12:25:39Z hardy.ferentschik $
+/*
+* 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.validator.constraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class CloneableConstraintValidator implements ConstraintValidator<Cloneable, java.lang.Cloneable> {
+
+ public void initialize(Cloneable annotation) {
+ }
+
+ public boolean isValid(java.lang.Cloneable value, ConstraintValidatorContext constraintValidatorContext) {
+ return true;
+ }
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Object.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Object.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Object.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,44 @@
+// $Id: Positive.java 17421 2009-08-26 12:25:39Z hardy.ferentschik $
+/*
+* 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.validator.constraints;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Constraint(validatedBy = { ObjectConstraintValidator.class })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE })
+@Retention(RUNTIME)
+@Documented
+public @interface Object {
+ String message() default "{org.hibernate.validator.constraints.Object.message}";
+
+ Class<?>[] groups() default { };
+
+ Class<? extends Payload>[] payload() default { };
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/ObjectConstraintValidator.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/ObjectConstraintValidator.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/ObjectConstraintValidator.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,34 @@
+// $Id: PositiveConstraintValidator.java 17421 2009-08-26 12:25:39Z hardy.ferentschik $
+/*
+* 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.validator.constraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class ObjectConstraintValidator implements ConstraintValidator<Object, java.lang.Object> {
+
+ public void initialize(Object annotation) {
+ }
+
+ public boolean isValid(java.lang.Object value, ConstraintValidatorContext constraintValidatorContext) {
+ return true;
+ }
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Serializable.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Serializable.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/Serializable.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,44 @@
+// $Id: Positive.java 17421 2009-08-26 12:25:39Z hardy.ferentschik $
+/*
+* 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.validator.constraints;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Constraint(validatedBy = { SerializableConstraintValidator.class })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE })
+@Retention(RUNTIME)
+@Documented
+public @interface Serializable {
+ public abstract String message() default "{org.hibernate.validator.constraints.Serializable.message}";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SerializableConstraintValidator.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SerializableConstraintValidator.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SerializableConstraintValidator.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,34 @@
+// $Id: PositiveConstraintValidator.java 17421 2009-08-26 12:25:39Z hardy.ferentschik $
+/*
+* 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.validator.constraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SerializableConstraintValidator implements ConstraintValidator<Serializable, java.io.Serializable > {
+
+ public void initialize(Serializable annotation) {
+ }
+
+ public boolean isValid( java.io.Serializable value, ConstraintValidatorContext constraintValidatorContext) {
+ return true;
+ }
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SubType.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SubType.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SubType.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,24 @@
+// $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.validator.constraints;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SubType extends SuperType {
+}
\ No newline at end of file
Property changes on: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SubType.java
___________________________________________________________________
Name: svn:keywords
+ Id
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperType.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperType.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperType.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,24 @@
+// $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.validator.constraints;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SuperType {
+}
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperTypeArray.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperTypeArray.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperTypeArray.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,44 @@
+// $Id: Positive.java 17421 2009-08-26 12:25:39Z hardy.ferentschik $
+/*
+* 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.validator.constraints;
+
+import java.lang.annotation.Documented;
+import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.METHOD;
+import java.lang.annotation.Retention;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+import java.lang.annotation.Target;
+import javax.validation.Constraint;
+import javax.validation.Payload;
+
+
+/**
+ * @author Hardy Ferentschik
+ */
+@Constraint(validatedBy = { SuperTypeArrayValidator.class })
+@Target({ METHOD, FIELD, ANNOTATION_TYPE })
+@Retention(RUNTIME)
+@Documented
+public @interface SuperTypeArray {
+ public abstract String message() default "{org.hibernate.validator.constraints.SuperTypeArray.message}";
+
+ public abstract Class<?>[] groups() default { };
+
+ public abstract Class<? extends Payload>[] payload() default { };
+}
\ No newline at end of file
Added: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperTypeArrayValidator.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperTypeArrayValidator.java (rev 0)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/SuperTypeArrayValidator.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -0,0 +1,34 @@
+// $Id: PositiveConstraintValidator.java 17421 2009-08-26 12:25:39Z hardy.ferentschik $
+/*
+* 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.validator.constraints;
+
+import javax.validation.ConstraintValidator;
+import javax.validation.ConstraintValidatorContext;
+
+/**
+ * @author Hardy Ferentschik
+ */
+public class SuperTypeArrayValidator implements ConstraintValidator<SuperTypeArray, SuperType[]> {
+
+ public void initialize(SuperTypeArray annotation) {
+ }
+
+ public boolean isValid(SuperType[] value, ConstraintValidatorContext constraintValidatorContext) {
+ return true;
+ }
+}
\ No newline at end of file
Modified: validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/ValidatorResolutionTest.java
===================================================================
--- validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/ValidatorResolutionTest.java 2009-09-28 13:33:56 UTC (rev 17575)
+++ validator/trunk/hibernate-validator/src/test/java/org/hibernate/validator/constraints/ValidatorResolutionTest.java 2009-09-28 16:09:36 UTC (rev 17576)
@@ -1,4 +1,4 @@
-// $Id:$
+// $Id$
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
@@ -113,4 +113,100 @@
constraintViolations = validator.validate( suburb );
assertNumberOfViolations( constraintViolations, 0 );
}
+
+ /**
+ * HV-233
+ */
+ @Test
+ public void testObjectArraysAndPrimitiveArraysAreSubtypesOfObject() {
+ Validator validator = TestUtil.getValidator();
+
+ Foo testEntity = new Foo( new Object[] { }, new int[] { } );
+ Set<ConstraintViolation<Foo>> constraintViolations = validator.validate( testEntity );
+ assertNumberOfViolations( constraintViolations, 0 );
+ }
+
+ /**
+ * HV-233
+ */
+ @Test
+ public void testObjectArraysAndPrimitiveArraysAreSubtypesOfClonable() {
+ Validator validator = TestUtil.getValidator();
+
+ Bar testEntity = new Bar( new Object[] { }, new int[] { } );
+ Set<ConstraintViolation<Bar>> constraintViolations = validator.validate( testEntity );
+ assertNumberOfViolations( constraintViolations, 0 );
+ }
+
+ /**
+ * HV-233
+ */
+ @Test
+ public void testObjectArraysAndPrimitiveArraysAreSubtypesOfSerializable() {
+ Validator validator = TestUtil.getValidator();
+
+ Fubar testEntity = new Fubar( new Object[] { }, new int[] { } );
+ Set<ConstraintViolation<Fubar>> constraintViolations = validator.validate( testEntity );
+ assertNumberOfViolations( constraintViolations, 0 );
+ }
+
+ /**
+ * HV-233
+ */
+ @Test
+ public void testSubTypeArrayIsSubtypeOfSuperTypeArray() {
+ Validator validator = TestUtil.getValidator();
+
+ SubTypeEntity testEntity = new SubTypeEntity( new SubType[] { } );
+ Set<ConstraintViolation<SubTypeEntity>> constraintViolations = validator.validate( testEntity );
+ assertNumberOfViolations( constraintViolations, 0 );
+ }
+
+ public class Foo {
+ @Object
+ private Object[] objectArray;
+
+ @Object
+ private int[] intArray;
+
+ public Foo(Object[] objectArray, int[] intArray) {
+ this.objectArray = objectArray;
+ this.intArray = intArray;
+ }
+ }
+
+ public class Bar {
+ @Cloneable
+ private Object[] objectArray;
+
+ @Cloneable
+ private int[] intArray;
+
+ public Bar(Object[] objectArray, int[] intArray) {
+ this.objectArray = objectArray;
+ this.intArray = intArray;
+ }
+ }
+
+ public class Fubar {
+ @Serializable
+ private Object[] objectArray;
+
+ @Serializable
+ private int[] intArray;
+
+ public Fubar(Object[] objectArray, int[] intArray) {
+ this.objectArray = objectArray;
+ this.intArray = intArray;
+ }
+ }
+
+ public class SubTypeEntity {
+ @SuperTypeArray
+ private SubType[] subTypeArray;
+
+ public SubTypeEntity(SubType[] subTypeArray) {
+ this.subTypeArray = subTypeArray;
+ }
+ }
}
15 years, 4 months
Hibernate SVN: r17575 - in beanvalidation: tck/tags and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-09-28 09:33:56 -0400 (Mon, 28 Sep 2009)
New Revision: 17575
Added:
beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha6/
Removed:
beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha6/
Log:
Moved beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha6 to beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha6.
Copied: beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha6 (from rev 17574, beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha6)
15 years, 4 months
Hibernate SVN: r17572 - in beanvalidation: tck/tags and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-09-28 09:30:14 -0400 (Mon, 28 Sep 2009)
New Revision: 17572
Added:
beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha5/
Removed:
beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha5/
Log:
Moved beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha5 to beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha5.
Copied: beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha5 (from rev 17571, beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha5)
15 years, 4 months
Hibernate SVN: r17571 - in beanvalidation: tck/tags and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-09-28 09:27:05 -0400 (Mon, 28 Sep 2009)
New Revision: 17571
Added:
beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha4/
Removed:
beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha4/
Log:
Moved beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha4 to beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha4.
Copied: beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha4 (from rev 17570, beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha4)
15 years, 4 months
Hibernate SVN: r17570 - in beanvalidation: tck/tags and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-09-28 09:24:20 -0400 (Mon, 28 Sep 2009)
New Revision: 17570
Added:
beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha3/
Removed:
beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha3/
Log:
Moved beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha3 to beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha3.
Copied: beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha3 (from rev 17569, beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha3)
15 years, 4 months
Hibernate SVN: r17569 - in beanvalidation: tck/tags and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-09-28 09:18:29 -0400 (Mon, 28 Sep 2009)
New Revision: 17569
Added:
beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha2/
Removed:
beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha2/
Log:
Moved beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha2 to beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha2.
Copied: beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha2 (from rev 17568, beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha2)
15 years, 4 months
Hibernate SVN: r17568 - in beanvalidation: tck/tags and 1 other directory.
by hibernate-commits@lists.jboss.org
Author: hardy.ferentschik
Date: 2009-09-28 09:15:49 -0400 (Mon, 28 Sep 2009)
New Revision: 17568
Added:
beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha1/
Removed:
beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha1/
Log:
Moved beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha1 to beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha1.
Copied: beanvalidation/tck/tags/jsr303-tck-1.0.0.Alpha1 (from rev 17567, beanvalidation/api/tags/jsr303-tck-1.0.0.Alpha1)
15 years, 4 months