mariofusco commented on code in PR #6086:
URL:
https://github.com/apache/incubator-kie-drools/pull/6086#discussion_r1763034923
##########
drools-model/drools-model-codegen/src/main/java/org/drools/model/codegen/execmodel/generator/drlxparse/CoercedExpression.java:
##########
@@ -151,9 +153,22 @@ public CoercedExpressionResult coerce() {
coercedLeft = left;
}
+ checkCoercion(coercedLeft, coercedRight, leftClass, rightClass);
return new CoercedExpressionResult(coercedLeft, coercedRight,
rightAsStaticField);
}
+ private void checkCoercion(TypedExpression coercedLeft, TypedExpression
coercedRight, Class<?> leftClass, Class<?> rightClass) {
+ if (equalityExpr) {
Review Comment:
I believe that this will reduce a bit the readability, and if you are
suggesting this only for performance reason I'm pretty sure that invoking a
bimorphic capturing lambda will be order of magnitude slower than accessing a
local boolean variable.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]