You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Konrad Windszus (JIRA)" <ji...@apache.org> on 2017/03/02 19:24:45 UTC

[jira] [Commented] (SLING-6569) NPE in DefaultValidationFailure when resource bundle is null

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

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

I am actually planning on changing it to return a meaningful message when the given resource bundle is null by falling back to a default resource bundle (e.g. for usage in exceptions, where no other resource bundle is available). Will come up with a patch for that tomorrow.

> 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: Oliver Lietz
>             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)