[jboss-svn-commits] JBL Code SVN: r25976 - labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Mon Apr 6 14:49:17 EDT 2009
Author: stampy88
Date: 2009-04-06 14:49:17 -0400 (Mon, 06 Apr 2009)
New Revision: 25976
Modified:
labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/LeftTuple.java
Log:
Removed unnecessary !null check on rightParent for unlinkFromRightParent
Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/LeftTuple.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/LeftTuple.java 2009-04-06 15:19:08 UTC (rev 25975)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/reteoo/LeftTuple.java 2009-04-06 18:49:17 UTC (rev 25976)
@@ -1,8 +1,5 @@
package org.drools.reteoo;
-import java.util.ArrayList;
-import java.util.List;
-
import org.drools.common.InternalFactHandle;
import org.drools.rule.Declaration;
import org.drools.spi.Activation;
@@ -131,8 +128,8 @@
}
public void unlinkFromLeftParent() {
- LeftTuple previous = (LeftTuple) this.leftParentPrevious;
- LeftTuple next = (LeftTuple) this.leftParentNext;
+ LeftTuple previous = this.leftParentPrevious;
+ LeftTuple next = this.leftParentNext;
if ( previous != null && next != null ) {
//remove from middle
@@ -172,8 +169,8 @@
// no right parent;
return;
}
- LeftTuple previous = (LeftTuple) this.rightParentPrevious;
- LeftTuple next = (LeftTuple) this.rightParentNext;
+ LeftTuple previous = this.rightParentPrevious;
+ LeftTuple next = this.rightParentNext;
if ( previous != null && next != null ) {
//remove from middle
@@ -186,7 +183,7 @@
} else if ( previous != null ) {
//remove from end
this.rightParentPrevious.rightParentNext = null;
- } else if ( this.rightParent != null ) {
+ } else {
this.rightParent.setBetaChildren( null );
}
@@ -373,7 +370,7 @@
LeftTuple entry = this;
while ( entry != null ) {
//buffer.append( entry.handle );
- buffer.append( entry.handle + "\n" );
+ buffer.append(entry.handle).append("\n");
entry = entry.parent;
}
return buffer.toString();
More information about the jboss-svn-commits
mailing list