Skip to content

[NO-ISSUE] bump mvel to 2.5.4.Final - #226

Merged
baldimir merged 3 commits into
kiegroup:mainfrom
tkobayas:kiegroup-upgrade-mvel
Sep 2, 2026
Merged

baldimir merged 3 commits into
kiegroup:mainfrom
tkobayas:kiegroup-upgrade-mvel

Conversation

@tkobayas

@tkobayas tkobayas commented Aug 28, 2026 •

Copy link
Copy Markdown

ksession.insert(john);
assertThat(ksession.fireAllRules()).isEqualTo(1);
assertThat(john.getMoney()).isEqualTo(new BigDecimal( 0 ));
assertThat(john.getMoney()).isEqualByComparingTo(new BigDecimal( 0 ));

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result is BigDecimal 0.0, so failed with isEqualTo. The scale difference was introduced by mvel/mvel#321. I think using isEqualByComparingTo is rather correct, because it doesn't make sense to be strict about scale when calculating with double.

@tkobayas
tkobayas marked this pull request as draft August 28, 2026 09:40
@tkobayas

Copy link
Copy Markdown
Author
[ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.022 s <<< FAILURE! -- in org.kie.yard.core.MVELJSONTest
[ERROR] org.kie.yard.core.MVELJSONTest.testMVELManagesJSONMaps -- Time elapsed: 0.019 s <<< ERROR!
java.lang.RuntimeException: interpretation failed at runtime
	at org.kie.yard.core.MVELLiteralExpressionInterpreter.fire(MVELLiteralExpressionInterpreter.java:59)
	at org.kie.yard.core.YaRDDefinitions.evaluate(YaRDDefinitions.java:43)
	at org.kie.yard.core.YaRDRunner.evaluate(YaRDRunner.java:58)
	at org.kie.yard.core.YaRDRunner.evaluate(YaRDRunner.java:63)
	at org.kie.yard.core.TestBase.evaluate(TestBase.java:34)
	at org.kie.yard.core.MVELJSONTest.testMVELManagesJSONMaps(MVELJSONTest.java:41)
Caused by: [Error: unexpected end of statement]
[Near : {... ( Item.Name in Delivery_32Items ) ....}]
                                              ^
[Line: 1, Column: 34]
	at org.mvel2.compiler.AbstractParser.nextToken(AbstractParser.java:1286)
	at org.mvel2.MVELInterpretedRuntime.parseAndExecuteInterpreted(MVELInterpretedRuntime.java:92)
	at org.mvel2.MVELInterpretedRuntime.parse(MVELInterpretedRuntime.java:58)
	at org.mvel2.MVEL.eval(MVEL.java:171)
	at org.kie.yard.core.MVELLiteralExpressionInterpreter.fire(MVELLiteralExpressionInterpreter.java:55)
	... 5 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: Index 33 out of bounds for length 33
	at org.mvel2.ast.Fold.<init>(Fold.java:73)
	at org.mvel2.compiler.AbstractParser.nextToken(AbstractParser.java:1044)
	... 9 more

It's another issue in mvel2. mvel/mvel@043303ce was a valid fix, but it revealed a latent bug in Fold.java.

Need to fix mvel2 and release a new version before drools consumes it.

@tkobayas

tkobayas commented Sep 2, 2026

Copy link
Copy Markdown
Author

Fixed in mvel 2.5.4.Final, so bumping again.

@tkobayas tkobayas changed the title [NO-ISSUE] bump mvel to 2.5.3.Final [NO-ISSUE] bump mvel to 2.5.4.Final Sep 2, 2026
@tkobayas
tkobayas marked this pull request as ready for review September 2, 2026 07:49
@tkobayas
tkobayas requested a review from baldimir September 2, 2026 07:50
@baldimir
baldimir merged commit 9cc2e0e into kiegroup:main Sep 2, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants