gitgabrio commented on code in PR #5907:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5907#discussion_r1593698007


##########
drools-drl/drools-drl-parser/src/main/java/org/drools/drl/parser/antlr4/DRLVisitorImpl.java:
##########
@@ -803,12 +803,19 @@ public AccumulateDescr 
visitFromAccumulate(DRLParser.FromAccumulateContext ctx)
     @Override
     public AccumulateDescr.AccumulateFunctionCallDescr 
visitAccumulateFunction(DRLParser.AccumulateFunctionContext ctx) {
         String function = ctx.drlIdentifier().getText();
-        String bind = ctx.label() == null ? null : 
ctx.label().drlIdentifier().getText();
+        String bind = null;
+        boolean unify = false;
+        if (ctx.label() != null) {

Review Comment:
   HI @tkobayas Thanks for the PR.
   Sorry to be picky, but those `if` `else if` lines maybe could be simplified;
   what about something like:
   
   ```java
    String label = ctx.label() != null ? ctx.label().drlIdentifier().getText() 
: null;
    boolean unify = ctx.unify() != null;
   String bind = unify ? ctx.unif().drlIdentifier().getText() : label;
   ```
   
   Would this work ?
   
   



-- 
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]

Reply via email to