sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Konrad Windszus (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SLING-6569) NPE in DefaultValidationFailure when resource bundle is null
Date Fri, 03 Mar 2017 08:29:45 GMT

    [ https://issues.apache.org/jira/browse/SLING-6569?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15893913#comment-15893913
] 

Konrad Windszus commented on SLING-6569:
----------------------------------------

I now really made the {{ResourceBundle}} parameter optional in [r1785229|http://svn.apache.org/r1785229].
In case {{null}} is provided the default resource bundle will be used which is given in the
constructor to {{DefaultValidationFailure}} and can be retrieved in every {{Validator}} via
{{ValidationContext.getDefaultResourceBundle()}}.

> NPE in DefaultValidationFailure when resource bundle is null
> ------------------------------------------------------------
>
>                 Key: SLING-6569
>                 URL: https://issues.apache.org/jira/browse/SLING-6569
>             Project: Sling
>          Issue Type: Bug
>          Components: Extensions, Validation
>            Reporter: Oliver Lietz
>            Assignee: Konrad Windszus
>             Fix For: Validation 1.0.0
>
>
> Before:
> {noformat}
> [...]
> 2017-03-02 15:39:42,933 ERROR [127.0.0.1 [1488465582809] POST /validation/testing/fakeFolder1/resource
HTTP/1.1] o.a.s.e.i.SlingRequestProcessorImpl [SlingRequestProcessorImpl.java : 225] service:
Uncaught Throwable
> java.lang.NullPointerException: null
> 	at org.apache.sling.validation.spi.DefaultValidationFailure.getMessage(DefaultValidationFailure.java:64)
> 	at org.apache.sling.validation.testservices.internal.ValidationPostResponse.doSend(ValidationPostResponse.java:63)
> 	at org.apache.sling.servlets.post.AbstractPostResponse.send(AbstractPostResponse.java:387)
> 	at org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:226)
> [...]
> {noformat}
> After:
> {noformat}
> [...]
> 2017-03-02 15:46:33,866 ERROR [127.0.0.1 [1488465993738] POST /validation/testing/fakeFolder1/resource
HTTP/1.1] o.a.s.e.i.SlingRequestProcessorImpl [SlingRequestProcessorImpl.java : 225] service:
Uncaught Throwable
> java.lang.NullPointerException: ResourceBundle must not be null
> 	at org.apache.sling.validation.spi.DefaultValidationFailure.getMessage(DefaultValidationFailure.java:65)
> 	at org.apache.sling.validation.testservices.internal.ValidationPostResponse.doSend(ValidationPostResponse.java:63)
> 	at org.apache.sling.servlets.post.AbstractPostResponse.send(AbstractPostResponse.java:387)
> 	at org.apache.sling.servlets.post.impl.SlingPostServlet.doPost(SlingPostServlet.java:226)
> [...]
> {noformat}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message