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

Radu Cotescu commented on SLING-9783:
-------------------------------------

Fixed in:
* [commit 
dba0f3d|https://github.com/apache/sling-org-apache-sling-scripting-sightly-compiler/commit/dba0f3d]
* [commit 
685f9b3|https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing-content/commit/685f9b3]
* [commit 
b4ccab9|https://github.com/apache/sling-org-apache-sling-scripting-sightly-testing/commit/b4ccab9]

> The HTL compiler will trigger a NPE if a null value should be written into an 
> HTML attribute
> --------------------------------------------------------------------------------------------
>
>                 Key: SLING-9783
>                 URL: https://issues.apache.org/jira/browse/SLING-9783
>             Project: Sling
>          Issue Type: Bug
>          Components: Scripting
>    Affects Versions: Scripting HTL Compiler 1.2.8-1.4.0
>            Reporter: Radu Cotescu
>            Assignee: Radu Cotescu
>            Priority: Major
>             Fix For: Scripting HTL Compiler 1.2.10-1.4.0
>
>
> SLING-9696 introduced a side-effect into the HTL compiler, which doesn't 
> correctly check if an attribute should be displayed or not when the evaluated 
> expression returns a {{null}} value.
> The following code example will generate a NPE:
> {code:html}
> <a href="${pojo.null @ context='unsafe'}>Click</a>
> {code}
> if the {{pojo.null}} actually returns {{null}}, since the {{unsafe}} context 
> will return the original passed value.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to