[jboss-svn-commits] JBL Code SVN: r18913 - labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/reteoo.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Mar 12 22:08:15 EDT 2008


Author: tirelli
Date: 2008-03-12 22:08:15 -0400 (Wed, 12 Mar 2008)
New Revision: 18913

Modified:
   labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java
Log:
fixing OTN opt

Modified: labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java
===================================================================
--- labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java	2008-03-13 02:07:39 UTC (rev 18912)
+++ labs/jbossrules/branches/4.0.x/drools-core/src/main/java/org/drools/reteoo/ObjectTypeNode.java	2008-03-13 02:08:15 UTC (rev 18913)
@@ -144,7 +144,7 @@
             return;
         }
 
-        if ( this.objectMemoryEnabled) {
+        if ( this.objectMemoryEnabled ) {
             final FactHashTable memory = (FactHashTable) workingMemory.getNodeMemory( this );
             memory.add( handle,
                         false );
@@ -228,12 +228,12 @@
             removeObjectSink( (ObjectSink) node );
         }
         // JBRULES-1315: never remove OTNs
-//        if ( !this.isInUse() ) {
-//            for ( int i = 0, length = workingMemories.length; i < length; i++ ) {
-//                workingMemories[i].clearNodeMemory( this );
-//            }
-//            this.rete.removeObjectSink( this );
-//        }
+        //        if ( !this.isInUse() ) {
+        //            for ( int i = 0, length = workingMemories.length; i < length; i++ ) {
+        //                workingMemories[i].clearNodeMemory( this );
+        //            }
+        //            this.rete.removeObjectSink( this );
+        //        }
     }
 
     /**
@@ -303,7 +303,7 @@
         // If we have no alpha or beta node with constraints on this ObjectType, we can just skip modifies
         boolean hasConstraints = false;
         for ( int i = 0; i < sinks.length && !hasConstraints; i++ ) {
-            if ( sinks[i] instanceof AlphaNode || sinks[i] instanceof AccumulateNode || sinks[i] instanceof CollectNode || sinks[i] instanceof FromNode ) {
+            if ( sinks[i] instanceof AlphaNode || sinks[i] instanceof AccumulateNode || sinks[i] instanceof CollectNode || sinks[i] instanceof FromNode || sinks[i] instanceof EvalConditionNode ) {
                 hasConstraints = true;
             } else if ( sinks[i] instanceof BetaNode && ((BetaNode) sinks[i]).getConstraints().length > 0 ) {
                 hasConstraints = this.usesDeclaration( ((BetaNode) sinks[i]).getConstraints() );
@@ -331,7 +331,7 @@
         boolean usesDecl = false;
         final Declaration[] declarations = constraint.getRequiredDeclarations();
         for ( int j = 0; !usesDecl && j < declarations.length; j++ ) {
-            usesDecl = (declarations[j].getPattern().getObjectType().equals( this.objectType ) );
+            usesDecl = (declarations[j].getPattern().getObjectType().equals( this.objectType ));
         }
         return usesDecl;
     }




More information about the jboss-svn-commits mailing list