[jboss-svn-commits] JBL Code SVN: r26892 - labs/jbossrules/branches/DroolsChance/drools-api/src/main/java/org/drools/reteoo.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Jun 10 02:46:19 EDT 2009


Author: dsotty
Date: 2009-06-10 02:46:19 -0400 (Wed, 10 Jun 2009)
New Revision: 26892

Modified:
   labs/jbossrules/branches/DroolsChance/drools-api/src/main/java/org/drools/reteoo/ConstraintKey.java
   labs/jbossrules/branches/DroolsChance/drools-api/src/main/java/org/drools/reteoo/DynamicConstraintKey.java
Log:


Modified: labs/jbossrules/branches/DroolsChance/drools-api/src/main/java/org/drools/reteoo/ConstraintKey.java
===================================================================
--- labs/jbossrules/branches/DroolsChance/drools-api/src/main/java/org/drools/reteoo/ConstraintKey.java	2009-06-09 17:23:28 UTC (rev 26891)
+++ labs/jbossrules/branches/DroolsChance/drools-api/src/main/java/org/drools/reteoo/ConstraintKey.java	2009-06-10 06:46:19 UTC (rev 26892)
@@ -65,7 +65,7 @@
 		if (other == null) return false;
 		if (other instanceof ConstraintKey) {
 			ConstraintKey otherK = (ConstraintKey) other;
-			return this.key.equals(otherK.key) || this.alias.equals(otherK.alias);
+			return this.key.equals(otherK.key) || (this.alias.length() > 0 && this.alias.equals(otherK.alias));
 		}
 		else 
 			return false;		
@@ -98,5 +98,7 @@
 			return key;
 	}
 
+	
 
+
 }

Modified: labs/jbossrules/branches/DroolsChance/drools-api/src/main/java/org/drools/reteoo/DynamicConstraintKey.java
===================================================================
--- labs/jbossrules/branches/DroolsChance/drools-api/src/main/java/org/drools/reteoo/DynamicConstraintKey.java	2009-06-09 17:23:28 UTC (rev 26891)
+++ labs/jbossrules/branches/DroolsChance/drools-api/src/main/java/org/drools/reteoo/DynamicConstraintKey.java	2009-06-10 06:46:19 UTC (rev 26892)
@@ -44,4 +44,9 @@
 		System.out.println("KEY EXPANDED "+arg+" into "+key);
 	}
 
+	public void replaceOp(String string) {
+		this.op = string;
+		this.key = this.op + this.key.substring(this.key.indexOf('('));
+	}
+	
 }




More information about the jboss-svn-commits mailing list