[jboss-svn-commits] JBL Code SVN: r25040 - labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Sun Feb 1 23:57:36 EST 2009


Author: mark.proctor at jboss.com
Date: 2009-02-01 23:57:36 -0500 (Sun, 01 Feb 2009)
New Revision: 25040

Modified:
   labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java
Log:
-unded global resolver change for now, need to correct tests.

Modified: labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java
===================================================================
--- labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java	2009-02-02 03:03:17 UTC (rev 25039)
+++ labs/jbossrules/trunk/drools-core/src/main/java/org/drools/common/AbstractWorkingMemory.java	2009-02-02 04:57:36 UTC (rev 25040)
@@ -135,8 +135,7 @@
     protected Map                                            queryResults;
 
     /** Global values which are associated with this memory. */
-    protected GlobalResolver                                 defaultGlobalResolver;
-    protected GlobalResolver                                 delegateGlobalResolver;
+    protected GlobalResolver                                 globalResolver;
 
     /** The eventSupport */
     protected WorkingMemoryEventSupport                      workingMemoryEventSupport;
@@ -245,7 +244,7 @@
         this.config = config;
         this.ruleBase = ruleBase;
         this.handleFactory = handleFactory;
-        this.defaultGlobalResolver = new MapGlobalResolver();
+        this.globalResolver = new MapGlobalResolver();
 
         final RuleBaseConfiguration conf = this.ruleBase.getConfiguration();
 
@@ -490,7 +489,7 @@
                 throw new RuntimeException( "Illegal class for global. " + "Expected [" + type.getName() + "], " + "found [" + value.getClass().getName() + "]." );
 
             } else {
-                this.defaultGlobalResolver.setGlobal( identifier,
+                this.globalResolver.setGlobal( identifier,
                                                value );
             }
         } finally {
@@ -501,14 +500,14 @@
     public void setGlobalResolver(final GlobalResolver globalResolver) {
         try {
             this.lock.lock();
-            this.delegateGlobalResolver = globalResolver;
+            this.globalResolver = globalResolver;
         } finally {
             this.lock.unlock();
         }
     }
 
     public GlobalResolver getGlobalResolver() {
-        return this.delegateGlobalResolver;
+        return this.globalResolver;
     }
 
     public long getId() {
@@ -522,11 +521,7 @@
     public Object getGlobal(final String identifier) {
         try {
             this.lock.lock();
-            Object object =  this.defaultGlobalResolver.resolveGlobal( identifier );
-            if ( object == null && this.delegateGlobalResolver != null ) {
-                object =  this.delegateGlobalResolver.resolveGlobal( identifier );
-            }
-            return object;
+            return this.globalResolver.resolveGlobal( identifier );
         } finally {
             this.lock.unlock();
         }




More information about the jboss-svn-commits mailing list