|
From: <jbo...@li...> - 2006-06-29 22:25:19
|
Author: mar...@jb...
Date: 2006-06-29 18:25:16 -0400 (Thu, 29 Jun 2006)
New Revision: 4876
Modified:
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/LogicTransformer.java
Log:
JBRULES-312 Explicit 'and' is not working
-It wasn't removing direct redundant ands, now fixed.
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/LogicTransformer.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/LogicTransformer.java 2006-06-29 22:25:13 UTC (rev 4875)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/rule/LogicTransformer.java 2006-06-29 22:25:16 UTC (rev 4876)
@@ -127,6 +127,7 @@
if ( or == null ) {
// No or so just assign
ands = new And[]{cloned};
+ checkForAndRemoveDuplicates( ands[0] );
} else {
ands = new And[or.getChildren().size()];
int i = 0;
@@ -140,9 +141,7 @@
ands[i] = newAnd;
}
- checkForAndRemoveDuplicates( ands[i] );
-
- i++;
+ checkForAndRemoveDuplicates( ands[i++] );
}
}
|