Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 22196 invoked from network); 21 Feb 2005 23:45:19 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 21 Feb 2005 23:45:19 -0000 Received: (qmail 13469 invoked by uid 500); 21 Feb 2005 23:45:17 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 13393 invoked by uid 500); 21 Feb 2005 23:45:17 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 13380 invoked by uid 500); 21 Feb 2005 23:45:17 -0000 Received: (qmail 13377 invoked by uid 99); 21 Feb 2005 23:45:17 -0000 X-ASF-Spam-Status: No, hits=-9.8 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from minotaur.apache.org (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.28) with SMTP; Mon, 21 Feb 2005 15:45:16 -0800 Received: (qmail 22159 invoked by uid 65534); 21 Feb 2005 23:45:15 -0000 Message-ID: <20050221234515.22158.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Mailer: svnmailer-1.0.0-dev Date: Mon, 21 Feb 2005 23:45:15 -0000 Subject: svn commit: r154743 - jakarta/commons/proper/digester/branches/digester2/src/java/org/apache/commons/digester2/plugins/PluginConfiguration.java To: commons-cvs@jakarta.apache.org From: skitching@apache.org X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Author: skitching Date: Mon Feb 21 15:45:13 2005 New Revision: 154743 URL: http://svn.apache.org/viewcvs?view=3Drev&rev=3D154743 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/a= pache/commons/digester2/plugins/PluginConfiguration.java URL: http://svn.apache.org/viewcvs/jakarta/commons/proper/digester/branches= /digester2/src/java/org/apache/commons/digester2/plugins/PluginConfiguratio= n=2Ejava?view=3Ddiff&r1=3D154742&r2=3D154743 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D --- 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 attribu= te + * @param namespaceURI is the namespace uri that the specified attribu= te * is in. If the attribute is in no namespace, then this should be nul= l=2E * Note that if a namespace is used, the attrName value should not<= /i> * contain any kind of namespace-prefix. Note also that if you are usi= ng @@ -163,9 +163,13 @@ * @param attrName is the attribute whose value contains the name of t= he * class to be instantiated. */ - public void setPluginClassAttribute(String namespaceUri, - String attrName) { - pluginClassAttrNS =3D namespaceUri; + public void setPluginClassAttribute(String namespaceURI, String attrNa= me) { + if (namespaceURI =3D=3D null) { + // The org.xml.sax.Attributes.getValue method expects an empty + // string, not null, to be used to indicate no namespace. + namespaceURI =3D ""; + } + pluginClassAttrNS =3D namespaceURI; pluginClassAttr =3D attrName; } =20 @@ -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 attribu= te + * @param namespaceURI is the namespace uri that the specified attribu= te * is in. If the attribute is in no namespace, then this should be nul= l=2E * Note that if a namespace is used, the attrName value should not<= /i> * contain any kind of namespace-prefix. Note also that if you are usi= ng @@ -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 =3D namespaceUri; + public void setPluginIdAttribute(String namespaceURI, String attrName)= { + if (namespaceURI =3D=3D null) { + // The org.xml.sax.Attributes.getValue method expects an empty + // string, not null, to be used to indicate no namespace. + namespaceURI =3D ""; + } + pluginIdAttrNS =3D namespaceURI; pluginIdAttr =3D attrName; } =20 --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org