-
Bug
-
Resolution: Done
-
Major
-
None
-
7.43.0.Final
-
None
-
2020 Week 40-42 (from Sep 28)
-
-
Undefined
-
NEW
-
NEW
-
---
-
---
When updating a KieContainer with updateToVersion with a change in a declared type two consecutive times, a NullPointerException is raised.
Minimal example DRL triggering the issue (notice at least two declared types are needed):
declare FactType1 x : int end declare FactType2 y : int end
first update:
declare FactType1 x : int z : int end declare FactType2 y : int end
second update:
declare FactType1 x : int z : int w : int end declare FactType2 y : int end
The second update will raise the following exception:
java.lang.NullPointerException at org.drools.compiler.kie.util.ChangeSetBuilder.build(ChangeSetBuilder.java:106) at org.drools.compiler.kie.builder.impl.InternalKieModule.getChanges(InternalKieModule.java:132) at org.drools.compiler.kie.builder.impl.KieContainerImpl.update(KieContainerImpl.java:241) at org.drools.compiler.kie.builder.impl.KieContainerImpl.update(KieContainerImpl.java:237) at org.drools.compiler.kie.builder.impl.KieContainerImpl.updateToVersion(KieContainerImpl.java:195) at org.example.reproducer.KjarUpdateTest.update(KjarUpdateTest.java:37) at org.example.reproducer.KjarUpdateTest.testConsecutiveUpdates(KjarUpdateTest.java:48)