[jboss-jira] [JBoss JIRA] (DROOLS-1215) import function(s) with collision on declared Pojo field names odd behavior and no warning
Matteo Mortari (JIRA)
issues at jboss.org
Tue Jul 19 13:12:00 EDT 2016
[ https://issues.jboss.org/browse/DROOLS-1215?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Matteo Mortari closed DROOLS-1215.
----------------------------------
Resolution: Won't Fix
> import function(s) with collision on declared Pojo field names odd behavior and no warning
> ------------------------------------------------------------------------------------------
>
> Key: DROOLS-1215
> URL: https://issues.jboss.org/browse/DROOLS-1215
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 6.4.0.Final
> Reporter: Matteo Mortari
> Assignee: Matteo Mortari
> Attachments: DROOLS-1215.zip
>
>
> Hello,
> not sure (yet) what is causing this odd behavior, but considering the following rule-base in the attached reproducer, evolved from the usual kie example archetype:
> {code}
> global java.util.Set controlSet;
> rule "will execute per each Measurement having ID color"
> no-loop
> when
> WantToKeep( condition == "color" )
> Measurement( id == "color", $colorVal : val )
> then
> controlSet.add($colorVal);
> end
> declare WantToKeep
> condition : String
> end
> rule "kickstart"
> salience 999
> when
> eval( true )
> then
> insert(new WantToKeep( "color" ));
> end
> {code}
> This works as expected until adding the following import statement:
> {code}
> import function org.jooq.impl.DSL.*;
> {code}
> and then the test will fail.
> I suspect because some "functions"/static method exists on {{org.jooq.impl.DSL}} with name "condition" which is colliding with the declared Pojo field name "condition", but I can't understand why this supposed collision happens as in the LHS I'm looking for the field not a method invocation with the {{condition()}} form.
> I'm willing to investigate more on this later, for the time being I thought worthy at least to raise this JIRA record for tracking.
> I will attach reproducer and workaround in the appropriate sections.
> Thank you,
> Ciao,
> MM
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list