Bug 1300692 - Parsing of a complex constraint with an || causes a RuntimeException
Parsing of a complex constraint with an || causes a RuntimeException
Product: JBoss BRMS Platform 6
Classification: JBoss
Component: BRE (Show other bugs)
Unspecified Unspecified
medium Severity medium
: DR2
: 6.3.0
Assigned To: Mario Fusco
Marek Winkler
Depends On:
Blocks: 1300699
  Show dependency treegraph
Reported: 2016-01-21 08:19 EST by Martin Weiler
Modified: 2017-05-24 01:33 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1300699 (view as bug list)
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
JBoss Issue Tracker DROOLS-1037 Major Resolved Parsing of a complex constraint with an || causes a RuntimeException 2016-05-26 07:43 EDT

  None (edit)
Description Martin Weiler 2016-01-21 08:19:23 EST
Description of problem:
Platform issue for DROOLS-1037 to fix the following RuntimeException during compilation:


	at org.drools.compiler.rule.builder.PatternBuilder.rewriteCompositeExpressions(PatternBuilder.java:924)

	at org.drools.compiler.rule.builder.PatternBuilder.rewriteCompositeExpressions(PatternBuilder.java:919)

	at org.drools.compiler.rule.builder.PatternBuilder.rewriteOrExpressions(PatternBuilder.java:893)

	at org.drools.compiler.rule.builder.PatternBuilder.buildExpression(PatternBuilder.java:889)

	at org.drools.compiler.rule.builder.PatternBuilder.buildCcdDescr(PatternBuilder.java:860)

	at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:715)

	at org.drools.compiler.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:580)

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Build a rule with the following LHS: 
$p : Person( name == null || (name in (\"Alice\", \"Charlie\", \"David\"))==false )
2. Try to compile the package

Actual results:
Build fails with RuntimeException

Expected results:
Build is successful

Additional info:
Changing the constraint to the following works as well:
$p : Person( name == null || (name not in (\"Alice\", \"Charlie\", \"David\")) )
Comment 2 Mario Fusco 2016-01-26 09:16:27 EST
Fixed by https://github.com/droolsjbpm/drools/commit/2b80add23
Comment 3 Marek Winkler 2016-03-18 10:58:52 EDT
Verified in BRMS 6.3.0.ER1.

Note You need to log in before you can comment on or make changes to this bug.