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/22 00:45:15 UTC
svn commit: r154743 -
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginConfiguration.java
Author: skitching
Date: Mon Feb 21 15:45:13 2005
New Revision: 154743
URL: http://svn.apache.org/viewcvs?view=rev&rev=154743
Log:
Allow namespaceURI param to be null in setPluginIdAttr/setPluginClassAttr
methods (automatically convert to empty string).
Modified:
jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginConfiguration.java
Modified: jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginConfiguration.java
URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginConfiguration.java?view=diff&r1=154742&r2=154743
==============================================================================
--- jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginConfiguration.java (original)
+++ jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginConfiguration.java Mon Feb 21 15:45:13 2005
@@ -154,7 +154,7 @@
* Note that the xml attributes used by PluginDeclarationRules are not
* affected by this method.
*
- * @param namespaceUri is the namespace uri that the specified attribute
+ * @param namespaceURI is the namespace uri that the specified attribute
* is in. If the attribute is in no namespace, then this should be null.
* Note that if a namespace is used, the attrName value should <i>not</i>
* contain any kind of namespace-prefix. Note also that if you are using
@@ -163,9 +163,13 @@
* @param attrName is the attribute whose value contains the name of the
* class to be instantiated.
*/
- public void setPluginClassAttribute(String namespaceUri,
- String attrName) {
- pluginClassAttrNS = namespaceUri;
+ public void setPluginClassAttribute(String namespaceURI, String attrName) {
+ if (namespaceURI == null) {
+ // The org.xml.sax.Attributes.getValue method expects an empty
+ // string, not null, to be used to indicate no namespace.
+ namespaceURI = "";
+ }
+ pluginClassAttrNS = namespaceURI;
pluginClassAttr = attrName;
}
@@ -193,7 +197,7 @@
* Note that the xml attributes used by PluginDeclarationRules are not
* affected by this method.
*
- * @param namespaceUri is the namespace uri that the specified attribute
+ * @param namespaceURI is the namespace uri that the specified attribute
* is in. If the attribute is in no namespace, then this should be null.
* Note that if a namespace is used, the attrName value should <i>not</i>
* contain any kind of namespace-prefix. Note also that if you are using
@@ -202,9 +206,13 @@
* @param attrName is the attribute whose value contains the id of the
* plugin declaration to be used when instantiating an object.
*/
- public void setPluginIdAttribute(String namespaceUri,
- String attrName) {
- pluginIdAttrNS = namespaceUri;
+ public void setPluginIdAttribute(String namespaceURI, String attrName) {
+ if (namespaceURI == null) {
+ // The org.xml.sax.Attributes.getValue method expects an empty
+ // string, not null, to be used to indicate no namespace.
+ namespaceURI = "";
+ }
+ pluginIdAttrNS = namespaceURI;
pluginIdAttr = attrName;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org