gitgabrio commented on code in PR #5794:
URL:
https://github.com/apache/incubator-kie-drools/pull/5794#discussion_r1529911674
##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLVisitorImpl.java:
##########
@@ -268,6 +268,7 @@ public RuleDescr visitRuledef(DRLParser.RuledefContext ctx)
{
ruleDescr.setConsequence(trimThen(getTokenTextPreservingWhitespace(ctx.rhs(),
tokenStream))); // RHS is just a text
}
+ populateStartEnd(ruleDescr, ctx);
Review Comment:
Hi @tkobayas , thanks for the PR!
IIUC the comment, it means that a [piece of
code](https://github.com/apache/incubator-kie-drools/blob/dev-new-parser/drools-compiler/src/main/java/org/drools/compiler/kie/util/ChangeSetBuilder.java#L247)
does not populate correctly a given object (`ruleDescr`), and your
modification somehow "workaround" that.
I read the
[method](https://github.com/apache/incubator-kie-drools/blob/5f83f08f169c0c4922e7bd842ae612c607f96dc8/drools-compiler/src/main/java/org/drools/compiler/kie/util/ChangeSetBuilder.java#L223),
and TBH is somehow "brittle" by itself (I may give detailed explanation of
this remark, if you want): would not be better to fix the root problem itself ?
Eventually, I would be glad to help there
--
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]