[ https://issues.apache.org/jira/browse/JEXL-190?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15168884#comment-15168884 ]
Dmitri Blinov commented on JEXL-190: ------------------------------------ It has turned out that the problem is reproduced if I try to initialize JEXLEngine with functions without a namespace in a way like this {code} functions = new HashMap<String, Object>(); // Register default function namespaces functions.put(null, new DefaultFunctions(this)); ... // Jexl Setup boolean verboseScripting = true; boolean strict = false; JexlBuilder jb = new JexlBuilder(); jb.silent(!verboseScripting); jb.strict(strict); jb.namespaces(functions); ... {code} If I comment out the line {code} // functions.put(null, new DefaultFunctions(this)); {code} everything works as expected. Now I wonder if it's correct to register functions with null namespace ? > function name within script is not resolved > -------------------------------------------- > > Key: JEXL-190 > URL: https://issues.apache.org/jira/browse/JEXL-190 > Project: Commons JEXL > Issue Type: Bug > Affects Versions: 3.0 > Reporter: Dmitri Blinov > Assignee: Henri Biestro > > {code} > z = function(x) { return x + 1}; return z(1) > {code} returns error unsolvable function/method 'z' while > {code} > var z = function(x) { return x + 1}; return z(1) > {code} returns 2 -- This message was sent by Atlassian JIRA (v6.3.4#6332)