-
Notifications
You must be signed in to change notification settings - Fork 2.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[DROOLS-6936] BigDecimalLiteral with binding in mvel dialect causes C… #4352
Conversation
probably will need to check conflict after merging https://github.com/kiegroup/drools/pull/4351 |
if (drlxExpr instanceof LiteralExpr ) { | ||
if (drlxExpr instanceof LiteralExpr) { | ||
Class<?> literalExpressionType = getLiteralExpressionType(((LiteralExpr) drlxExpr)); | ||
if (drlxExpr instanceof BigIntegerLiteralExpr) { | ||
drlxExpr = ((BigIntegerLiteralExpr) drlxExpr).convertToObjectCreationExpr(); | ||
} else if (drlxExpr instanceof BigDecimalLiteralExpr) { | ||
drlxExpr = ((BigDecimalLiteralExpr) drlxExpr).convertToObjectCreationExpr(); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For BinaryExpr
, we have already implemented the conversion from BigDecimalLiteralExpr
to ObjectCreationExpr
. For simple literal binding, I added the conversion here.
…lassCastException in executable model build
Jenkins run cdb |
1 similar comment
Jenkins run cdb |
CDB : Not related to this PR.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Two comments, but they can both be addressed later, since this is already merged.
ksession.fireAllRules(); | ||
|
||
Assertions.assertThat(result).containsExactly(new BigDecimal("0")); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If possible use the static import for assertThat - it is the most common way in the code, so better to keep it standardized. We can fix this all in a single pass later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pibizza . Filed https://issues.redhat.com/browse/DROOLS-6951
|
||
assertEquals("new java.math.BigDecimal(\"10.3\")", result.getExpr().toString()); | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are migrating away from junit assert to assertj assert, I suggest to start writing new tests using the assertj framework.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @pibizza . Filed https://issues.redhat.com/browse/DROOLS-6951
…lassCastException in executable model build (apache#4352)
…lassCastException in executable model build (apache#4352)
…lassCastException in executable model build (apache#4352)
…lassCastException in executable model build (#4352)
…lassCastException in executable model build (apache#4352)
…lassCastException in executable model build (#4352)
…lassCastException in executable model build
Ports
This PR is for 7.x.
for main -> https://github.com/kiegroup/drools/pull/4380
JIRA:
https://issues.redhat.com/browse/DROOLS-6936
How to replicate CI configuration locally?
Build Chain tool does "simple" maven build(s), the builds are just Maven commands, but because the repositories relates and depends on each other and any change in API or class method could affect several of those repositories there is a need to use build-chain tool to handle cross repository builds and be sure that we always use latest version of the code for each repository.
build-chain tool is a build tool which can be used on command line locally or in Github Actions workflow(s), in case you need to change multiple repositories and send multiple dependent pull requests related with a change you can easily reproduce the same build by executing it on Github hosted environment or locally in your development environment. See local execution details to get more information about it.
How to retest this PR or trigger a specific build:
a pull request please add comment: Jenkins retest this
for a full downstream build
run_fdb
a compile downstream build please add comment: Jenkins run cdb
a full production downstream build please add comment: Jenkins execute product fdb
an upstream build please add comment: Jenkins run upstream