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 2024/12/10 09:15:00 UTC

[jira] [Updated] (JEXL-433) Debugger does not accept empty return statement

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

Henri Biestro updated JEXL-433:
-------------------------------
    Fix Version/s: 3.4.1

> Debugger does not accept empty return statement
> -----------------------------------------------
>
>                 Key: JEXL-433
>                 URL: https://issues.apache.org/jira/browse/JEXL-433
>             Project: Commons JEXL
>          Issue Type: Bug
>    Affects Versions: 3.4.0
>            Reporter: Vincent Bussol
>            Assignee: Henri Biestro
>            Priority: Major
>             Fix For: 3.4.1
>
>
> A NullPointerException is thrown when using the Debugger with an empty return statement.
> {code:java}
> JexlEngine jexl = new JexlBuilder().create();
> final String src = "let condition = true; if (condition) { return; }";
> final JexlScript script = jexl.createScript(src);
> assertNotNull(script);
> Object result = script.execute(null);
> assertNull(result);
> Debugger debugger = new Debugger();
> assertTrue(debugger.debug(script)); {code}
> {code:java}
> java.lang.NullPointerException: Cannot load from object array because "this.children" is null
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)