You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by sk...@apache.org on 2005/02/20 11:29:56 UTC

svn commit: r154499 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginCreateAction.java

Author: skitching
Date: Sun Feb 20 02:29:54 2005
New Revision: 154499

URL: http://svn.apache.org/viewcvs?view=rev&rev=154499
Log:
Minor code tidyups, javadoc improvements.

Modified:
    jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginCreateAction.java

Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginCreateAction.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginCreateAction.java?view=diff&r1=154498&r2=154499
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginCreateAction.java (original)
+++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginCreateAction.java Sun Feb 20 02:29:54 2005
@@ -184,14 +184,12 @@
             log.debug("PluginCreateAction.beginParse");
         }
 
+        PluginDeclarationScope pds = PluginDeclarationScope.getInstance(context);
+
         if (baseClass == null) {
             baseClass = Object.class;
         }
 
-        PluginDeclarationScope pds  =
-            (PluginDeclarationScope) context.getItem(
-                PluginDeclarationScope.PLUGIN_DECL_SCOPE);
-
         if (defaultPluginClass != null) {
             // check default class is valid. We can't do this until the parse
             // begins, as we need to load the baseClass and plugin class via
@@ -217,9 +215,10 @@
             pds.addDeclaration(decl);
         }
 
+        // Because determining what xml attributes to look for is a little
+        // tricky, we figure it out here (once per parse) then cache that
+        // info in the context for use whenever the begin method is called.
         PluginAttrNames pluginAttrNames = createPluginAttrNames(context);
-        // and now we've done all that work, cache the info in the context
-        // as instance-specific data.
         context.putItem(PLUGIN_ATTR_NAMES, pluginAttrNames);
     }
 



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