You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bval.apache.org by "Carlos Vara (JIRA)" <ji...@apache.org> on 2010/04/23 17:30:50 UTC

[jira] Created: (BVAL-25) When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException

When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException
---------------------------------------------------------------------------------------------

                 Key: BVAL-25
                 URL: https://issues.apache.org/jira/browse/BVAL-25
             Project: BeanValidation
          Issue Type: Bug
          Components: jsr303
    Affects Versions: 0.1-incubating
            Reporter: Carlos Vara
         Attachments: ExceptionHandling.patch, ExceptionsContractTest.java, UnknownPropertyException.java

To fix this, I did some cleaning in the way exceptions are handled
- Created UnknownPropertyException, which extends ValidationException, to easily route that case and translate it to an IllegalArgumentException at top level method exit.
- All RTE thrown by getters in the validated beans will be wrapped in a ValidationException.
- Changed method unrecoverableValidationError(..) to build exceptions instead of throwing them.
- Created a set of tests that verify that the methods in ClassValidator honor the exception contract in the spec.

3 more tests pass.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (BVAL-25) When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException

Posted by "Carlos Vara (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BVAL-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Carlos Vara updated BVAL-25:
----------------------------

    Attachment: ExceptionsContractTest.java
                UnknownPropertyException.java
                ExceptionHandling.patch

Fix and new classes attached.

> When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException
> ---------------------------------------------------------------------------------------------
>
>                 Key: BVAL-25
>                 URL: https://issues.apache.org/jira/browse/BVAL-25
>             Project: BeanValidation
>          Issue Type: Bug
>          Components: jsr303
>    Affects Versions: 0.1-incubating
>            Reporter: Carlos Vara
>         Attachments: ExceptionHandling.patch, ExceptionsContractTest.java, UnknownPropertyException.java
>
>
> To fix this, I did some cleaning in the way exceptions are handled
> - Created UnknownPropertyException, which extends ValidationException, to easily route that case and translate it to an IllegalArgumentException at top level method exit.
> - All RTE thrown by getters in the validated beans will be wrapped in a ValidationException.
> - Changed method unrecoverableValidationError(..) to build exceptions instead of throwing them.
> - Created a set of tests that verify that the methods in ClassValidator honor the exception contract in the spec.
> 3 more tests pass.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (BVAL-25) When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException

Posted by "Roman Stumm (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BVAL-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roman Stumm resolved BVAL-25.
-----------------------------

    Resolution: Fixed

Fixes applied, good job (as usual). Thanks, Carlos!

> When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException
> ---------------------------------------------------------------------------------------------
>
>                 Key: BVAL-25
>                 URL: https://issues.apache.org/jira/browse/BVAL-25
>             Project: BeanValidation
>          Issue Type: Bug
>          Components: jsr303
>    Affects Versions: 0.1-incubating
>            Reporter: Carlos Vara
>            Assignee: Roman Stumm
>         Attachments: ExceptionHandling.patch, ExceptionsContractTest.java, UnknownPropertyException.java
>
>
> To fix this, I did some cleaning in the way exceptions are handled
> - Created UnknownPropertyException, which extends ValidationException, to easily route that case and translate it to an IllegalArgumentException at top level method exit.
> - All RTE thrown by getters in the validated beans will be wrapped in a ValidationException.
> - Changed method unrecoverableValidationError(..) to build exceptions instead of throwing them.
> - Created a set of tests that verify that the methods in ClassValidator honor the exception contract in the spec.
> 3 more tests pass.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Assigned: (BVAL-25) When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException

Posted by "Roman Stumm (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BVAL-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Roman Stumm reassigned BVAL-25:
-------------------------------

    Assignee: Roman Stumm

> When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException
> ---------------------------------------------------------------------------------------------
>
>                 Key: BVAL-25
>                 URL: https://issues.apache.org/jira/browse/BVAL-25
>             Project: BeanValidation
>          Issue Type: Bug
>          Components: jsr303
>    Affects Versions: 0.1-incubating
>            Reporter: Carlos Vara
>            Assignee: Roman Stumm
>         Attachments: ExceptionHandling.patch, ExceptionsContractTest.java, UnknownPropertyException.java
>
>
> To fix this, I did some cleaning in the way exceptions are handled
> - Created UnknownPropertyException, which extends ValidationException, to easily route that case and translate it to an IllegalArgumentException at top level method exit.
> - All RTE thrown by getters in the validated beans will be wrapped in a ValidationException.
> - Changed method unrecoverableValidationError(..) to build exceptions instead of throwing them.
> - Created a set of tests that verify that the methods in ClassValidator honor the exception contract in the spec.
> 3 more tests pass.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Work started: (BVAL-25) When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException

Posted by "Roman Stumm (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/BVAL-25?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Work on BVAL-25 started by Roman Stumm.

> When validating a bean whose getter throws a RTE, it must be wrapped in a ValidationException
> ---------------------------------------------------------------------------------------------
>
>                 Key: BVAL-25
>                 URL: https://issues.apache.org/jira/browse/BVAL-25
>             Project: BeanValidation
>          Issue Type: Bug
>          Components: jsr303
>    Affects Versions: 0.1-incubating
>            Reporter: Carlos Vara
>            Assignee: Roman Stumm
>         Attachments: ExceptionHandling.patch, ExceptionsContractTest.java, UnknownPropertyException.java
>
>
> To fix this, I did some cleaning in the way exceptions are handled
> - Created UnknownPropertyException, which extends ValidationException, to easily route that case and translate it to an IllegalArgumentException at top level method exit.
> - All RTE thrown by getters in the validated beans will be wrapped in a ValidationException.
> - Changed method unrecoverableValidationError(..) to build exceptions instead of throwing them.
> - Created a set of tests that verify that the methods in ClassValidator honor the exception contract in the spec.
> 3 more tests pass.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.