gitgabrio commented on PR #5820:
URL: 
https://github.com/apache/incubator-kie-drools/pull/5820#issuecomment-2033774529

   > > Hi @yurloc @tkobayas @mariofusco looking at this PR, I noticed there are 
a lot of `null` check; e.g. :
   > > ```java
   > > if (ctx.DRL_TRAIT() != null) {
   > >             typeDeclarationDescr.setTrait(true);
   > > }
   > > ```
   > > 
   > > 
   > >     
   > >       
   > >     
   > > 
   > >       
   > >     
   > > 
   > >     
   > >   
   > > I think I understand the reason, but I wonder if there could be a nicer 
design to avoid them. I don't know how easy would be to change the 
`DRLParser.TypeDeclarationContext` (and similar *Context), but somehow all this 
null checking does not look very nice: what do you think ? (note: this would be 
just a nice-to-have)
   > 
   > Yeah, I totally hear you @gitgabrio but the whole `DRLParser` class is a 
_generated_ source code produced by `antlr4-maven-plugin` from `.g4` grammar 
files. I have no power over its API.
   
   Ok @yurloc thanks for explanation! 👍 


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