[hibernate-issues] [Hibernate-JIRA] Commented: (HV-448) Regression in beta2

Gunnar Morling (JIRA) noreply at atlassian.com
Wed Mar 9 18:58:08 EST 2011


    [ http://opensource.atlassian.com/projects/hibernate/browse/HV-448?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=40163#action_40163 ] 

Gunnar Morling commented on HV-448:
-----------------------------------

{quote}
However it does not seem consistent - the declarations for return types are not covered in the same manner - see updated testcase where return value constraints are still left on the concrete class - but still passes.
{quote}

This is because a strengthening of postconditions in sub-types is no problem in programming by contract. A client of a method just might get more guarantees for the return value than he had expected, but that's fine. This is also consistent with getter based property constraints, there the constraints in a hierarchy are conjoined, too.

{quote}
BTW: How about distributing https://github.com/gunnarmorling/methodvalidation-integration as hibernate-validator-aspects?
{quote}

Yepp, this might be an idea. I'm not quite sure how to proceed with the integration project. If you're using Seam/CDI, there is [Seam Validation|http://seamframework.org/Seam3/ValidationModule] but we surely need to find a solution for other stacks, too.

> Regression in beta2
> -------------------
>
>                 Key: HV-448
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HV-448
>             Project: Hibernate Validator
>          Issue Type: Bug
>    Affects Versions: 4.2.0.Beta2
>            Reporter: David J. M. Karlsen
>         Attachments: DummyBean.java, DummyService.java, DummyServiceImpl.java, ValidateMethod.java, ValidationAspect.java, ValidationAspectTest-context.xml, ValidationAspectTest.java
>
>
> The attached test and aspect used to pass just fine - but now fails with beta2.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the hibernate-issues mailing list