ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From maart...@apache.org
Subject svn commit: r1055219 - /ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/util/DelegetingHandler.java
Date Tue, 04 Jan 2011 22:37:22 GMT
Author: maartenc
Date: Tue Jan  4 22:37:21 2011
New Revision: 1055219

URL: http://svn.apache.org/viewvc?rev=1055219&view=rev
Log:
Now that the SAXParser is namespace aware, we can use the localName attribute again.

Modified:
    ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/util/DelegetingHandler.java

Modified: ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/util/DelegetingHandler.java
URL: http://svn.apache.org/viewvc/ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/util/DelegetingHandler.java?rev=1055219&r1=1055218&r2=1055219&view=diff
==============================================================================
--- ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/util/DelegetingHandler.java (original)
+++ ant/ivy/core/trunk/src/java/org/apache/ivy/osgi/util/DelegetingHandler.java Tue Jan  4
22:37:21 2011
@@ -163,9 +163,9 @@ public class DelegetingHandler/* <P exte
             if (!started) { // first time called ?
                 // just for the root, check the expected element name
                 // not need to check the delegated as the mapping is already taking care
of it
-                if (parent == null && !n.equals(tagName)) {
+                if (parent == null && !localName.equals(tagName)) {
                     // we are at the root and the saxed element doesn't match
-                    throw new SAXException("The root element of the parsed document '" +
n
+                    throw new SAXException("The root element of the parsed document '" +
localName
                             + "' didn't matched the expected one: '" + tagName + "'");
                 }
                 handleAttributes(atts);
@@ -176,7 +176,7 @@ public class DelegetingHandler/* <P exte
                     return;
                 }
                 // time now to delegate for a new element
-                delegate = (DelegetingHandler) mapping.get(n);
+                delegate = (DelegetingHandler) mapping.get(localName);
                 if (delegate != null) {
                     delegate.startElement(uri, localName, n, atts);
                 }
@@ -212,7 +212,7 @@ public class DelegetingHandler/* <P exte
             if (!skip) {
                 doEndElement(uri, localName, n);
             }
-            if (parent != null && tagName.equals(n)) {
+            if (parent != null && tagName.equals(localName)) {
                 // the current element is closed, let's tell the parent to stop delegating
                 stopDelegating();
             }



Mime
View raw message