[
https://issues.apache.org/jira/browse/JEXL-447?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Henri Biestro resolved JEXL-447.
--------------------------------
Resolution: Fixed
Commit
[7f1371b|https://github.com/apache/commons-jexl/commit/7f1371be2b87df40501193115f557548d4357a62].
> Regression in script-defined functions
> --------------------------------------
>
> Key: JEXL-447
> URL: https://issues.apache.org/jira/browse/JEXL-447
> Project: Commons JEXL
> Issue Type: Bug
> Affects Versions: 3.6.0
> Reporter: William Price
> Assignee: Henri Biestro
> Priority: Major
> Fix For: 3.6.0
>
>
> I have this existing behavior test in my code. It passes using 3.5.0:
> {code:java}
> let results = [...]
> function expect(const left, const right, const equal) {
> let correct = (left == right) === equal && !(left != right) === equal;
> results.add(correct ?: `${left} ?= ${right}`);
> return results;
> }
> function expectStrict(const left, const right, const equal) {
> let correct = (left === right) === equal && !(left !== right) === equal;
> results.add(correct ?: `${left} ?== ${right}`);
> return results;
> }
> expect(1.0, 1, true);
> expect(1.1, 1, false);
> expect(1.1, 1.1d, true);
> expect(1.1, 1.1f, false);
> expect('a', 'a', true);
> expect('a', 'b', false);
> expect('1', 1, true);
> expectStrict(1.0, 1.0, true);
> expectStrict(1.0, 1.0d, true);
> expectStrict(1.0, 1.0f, false);
> expectStrict(1.0, 1, false);
> expectStrict(1, '1', false); {code}
> When I switched to a locally built version off the master branch (containing
> my proposed fix for JEXL-446) it throws JexlException.Method:
> {noformat}
> unsolvable function/method 'expectStrict(Byte, Byte, Boolean) {noformat}
> I turned the above into a JUnit test and ran `git bisect` between 3.5.0
> (working) and the current head of master and bisect says the regression was
> introduced in:
> {noformat}
> 61b76f0b576893c2c53ed6a386089f4e89d9e542 is the first bad commit
> commit 61b76f0b576893c2c53ed6a386089f4e89d9e542
> Author: Henrib <[email protected]>
> Date: Tue Jul 8 17:36:06 2025 +0200
> JEXL-441 : updated tokenization for interpolation / back-quoted strings;
> - preparations for JEXL-442 {noformat}
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)