-
Bug
-
Resolution: Done
-
Major
-
7.0.0.Beta6
-
-
NEW
-
NEW
When using an OOPath expression in a declared window (does not matter if a length or a time window), a NPE is thrown. For instance, a rule such as:
declare window Pings
MessageEvent( /msg{ message == 'Ping' } ) over window:length( 2 )
end
rule R when
$messageEvent: MessageEvent() from window Pings
then
events.add( $messageEvent );
end
produces the following exception (see the attachment for the full stacktrace) when building the KieBase:
java.lang.NullPointerException at org.drools.core.reteoo.builder.WindowReferenceBuilder.build(WindowReferenceBuilder.java:40) at org.drools.core.reteoo.builder.PatternBuilder.attachPattern(PatternBuilder.java:116) at org.drools.core.reteoo.builder.PatternBuilder.build(PatternBuilder.java:77) at org.drools.core.reteoo.builder.GroupElementBuilder$AndBuilder.build(GroupElementBuilder.java:108) at org.drools.core.reteoo.builder.GroupElementBuilder.build(GroupElementBuilder.java:68) at org.drools.core.reteoo.builder.ReteooRuleBuilder.addSubRule(ReteooRuleBuilder.java:164) at org.drools.core.reteoo.builder.ReteooRuleBuilder.addRule(ReteooRuleBuilder.java:136) at org.drools.core.reteoo.ReteooBuilder.addRule(ReteooBuilder.java:110) ... at org.drools.compiler.kie.builder.impl.KieContainerImpl.createKieBase(KieContainerImpl.java:630) ...