<div dir="ltr"><div>




<table>





</table>It seems Weld proxy has the same annotations as the proxied class. However this conflicts with Bean validation spec as far as @Valid is concerned.<br><br><br>This section of the bean validation spec is ending up in violation due to the duplicated annotation:<br>• One must not mark a method return value for cascaded validation more than once in a line of a class hierarchy.<br>   In other words, overriding methods on sub types (be it sub classes/interfaces or interface implementations) cannot mark the return value for cascaded validation if the return value has already been marked on the overridden method of the super type or interface.<br><br>&quot;The @Valid annotation is used to declare that a cascaded validation of the given method/constructor parameters or<br>return values is performed by the Bean Validation provider. &quot;<br><br><br>Here is some debug added to the apache bean validation code that shows which two classes have the @Valid on the createValidEvent method:<br><br>$$$$$$$$$$$$DEBUG clazz = class org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.CalendarServiceWithCascadingReturnValue$Proxy$_$$_WeldSubclass method = public org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.Event org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.CalendarServiceWithCascadingReturnValue$Proxy$_$$_WeldSubclass.createValidEvent()<br>$$$$$$$$$$$$DEBUG clazz = class org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.CalendarServiceWithCascadingReturnValue method = public org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.Event org.hibernate.beanvalidation.tck.tests.integration.cdi.executable.CalendarServiceWithCascadingReturnValue.createValidEvent()<br>$$$$$$$$$$$$$$$$$DEBUG returnValid = 2   // number of hits having @Valid

<br clear="all"><br></div>If I understand correctly, I think this annotation needs to be treated differently.<br><div><div><div>-- <br><div class="gmail_signature">Thanks<br>Emily<br>=================<br>Emily Jiang<br><a href="mailto:ejiang@apache.org" target="_blank">ejiang@apache.org</a><br></div>
</div></div></div></div>