bval-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mark Struberg (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (BVAL-128) Validation of bean that implements Closeable results in an NPE
Date Fri, 05 Jun 2015 14:46:02 GMT

     [ https://issues.apache.org/jira/browse/BVAL-128?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mark Struberg updated BVAL-128:
-------------------------------
    Fix Version/s:     (was: 1.1.0-alpha)
                   1.1.0

> Validation of bean that implements Closeable results in an NPE
> --------------------------------------------------------------
>
>                 Key: BVAL-128
>                 URL: https://issues.apache.org/jira/browse/BVAL-128
>             Project: BVal
>          Issue Type: Bug
>          Components: jsr303
>    Affects Versions: 1.1.0-alpha
>            Reporter: Michael Blyakher
>             Fix For: 1.1.0
>
>         Attachments: BVAL-128_1.patch
>
>
> Validating a bean that implements Closeable results in an NPE. The code to reproduce
this is below.
>     public static void main( String[] args )
>     {        
> 		ValidatorFactory factory = Validation.buildDefaultValidatorFactory();
> 		Validator validator = factory.getValidator();
> 		
> 		validator.validate(new CloneableBean());
>     }
>     
>     private static class CloneableBean implements Cloneable {}
> Stack trace:
> Exception in thread "main" javax.validation.ValidationException: error during validation
of test.CloneableBean@363fbcdd
>     at org.apache.bval.jsr.ClassValidator.unrecoverableValidationError(ClassValidator.java:604)
>     at org.apache.bval.jsr.ClassValidator.validate(ClassValidator.java:144)
>     at test.Runner.main(Runner.java:16)
> Caused by: java.lang.NullPointerException
>     at org.apache.bval.jsr.ClassValidator.validateBeanNet(ClassValidator.java:409)
>     at org.apache.bval.jsr.ClassValidator.validateBeanWithGroups(ClassValidator.java:154)
>     at org.apache.bval.jsr.ClassValidator.validate(ClassValidator.java:142)
>     ... 1 more



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message