You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Henri Biestro (Jira)" <ji...@apache.org> on 2020/06/11 17:55:00 UTC

[jira] [Commented] (JEXL-275) Allow safe navigation as option

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

Henri Biestro commented on JEXL-275:
------------------------------------

Changeset: c70235e2ff12371bed4aca356de4abdf7d7bf64c
Author:    henrib <he...@apache.org>
Date:      2020-06-10 13:50
Message:   JEXL-275: lexical shade does not trigger undefined var if safe mode is true

> Allow safe navigation as option
> -------------------------------
>
>                 Key: JEXL-275
>                 URL: https://issues.apache.org/jira/browse/JEXL-275
>             Project: Commons JEXL
>          Issue Type: Improvement
>    Affects Versions: 3.1
>            Reporter: Henri Biestro
>            Assignee: Henri Biestro
>            Priority: Major
>             Fix For: 3.2
>
>
> WHAT:
> The 'safe navigation' operator (?.) - allowing a null property to stop and return null in a navigation expression - has been introduced. However, in many occasions, being able to let the '.' and '[...]' operators behave 'safely' without reverting to the 'lenient' mode  would be very convenient.
> Moreover, it seems 3.1 already allow 'safe' / silent navigation when calling methods / functions; fixing this behaviour will break existing scripts. Explicitly introducing this 'safe' behaviour would mitigate the (3.2) migration cost greatly.
> HOW:
> Builder option to set the flag, inject checking the flag when node.isSafeLhs(...) is used.



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