-
Bug
-
Resolution: Done
-
Major
-
None
-
7.24.0.Final
-
2019 Week 29-31, 2019 Week 32-34
-
3
-
- See unit test PR
-
NEW
-
NEW
When comparing a primitive int with an Integer inside a Map,
import java.util.Map; import org.drools.modelcompiler.domain.Person; rule R1 when $m : Map() Person(age == $m['age'] ) then end
executable-model build fails with "Comparison operation requires compatible types. Found int and class java.lang.Object" even though the Map's value is Integer.
[ERROR] Failures: [ERROR] CompilerTest.testMapPrimitiveComparison:1905->BaseModelTest.getKieSession:99->BaseModelTest.getKieSession:103->BaseModelTest.getKieContainer:107->BaseModelTest.getKieContainer:114->BaseModelTest.createKieBuilder:125->BaseModelTest.createKieBuilder:152 [Message [id=1, kieBase=defaultKieBase, level=ERROR, path=r0.drl, line=-1, column=0 text=Comparison operation requires compatible types. Found int and class java.lang.Object]]
Non executable-model has no issue with the rule.
- is incorporated by
-
RHDM-1035 Comparison error with primitive and Map in executable-model
- Closed