commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From skitch...@apache.org
Subject svn commit: r153387 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CreateObjectWithFactoryAction.java
Date Fri, 11 Feb 2005 12:20:29 GMT
Author: skitching
Date: Fri Feb 11 04:20:27 2005
New Revision: 153387

URL: http://svn.apache.org/viewcvs?view=rev&rev=153387
Log:
Fixes due to change to Context.putInstanceData method.

Modified:
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CreateObjectWithFactoryAction.java

Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CreateObjectWithFactoryAction.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CreateObjectWithFactoryAction.java?view=diff&r1=153386&r2=153387
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CreateObjectWithFactoryAction.java
(original)
+++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/actions/CreateObjectWithFactoryAction.java
Fri Feb 11 04:20:27 2005
@@ -49,6 +49,10 @@
     // Instance Variables
     // -----------------------------------------------------
 
+    private Context.ItemId OBJECT_FACTORY_ITEM
+        = new Context.ItemId(
+            CreateObjectWithFactoryAction.class, "ObjectFactory", this);
+    
     /**
      * The object creation factory (if any) explicitly provided to a
      * constructor. Note that (as per Action requirements) this value
@@ -252,7 +256,7 @@
         
         // now retrieve the cached ObjectFactory for this classname
         ObjectFactory factory = 
-            (ObjectFactory) context.getInstanceData(this, "objectFactory");
+            (ObjectFactory) context.getItem(OBJECT_FACTORY_ITEM);
         
         if (factory == null) {
             // this rule instance has never created a factory of this class
@@ -267,7 +271,7 @@
                 factory = (ObjectFactory) clazz.newInstance();
                 
                 // and cache the object for later retrieval by this instance
-                context.putInstanceData(this, "objectFactory", factory);
+                context.putItem(OBJECT_FACTORY_ITEM, factory);
             } catch(ClassNotFoundException ex) {
                 throw new ParseException(
                     "Unable to load class '" + realClassName + "'", ex);



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message