You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2008/04/11 01:44:36 UTC
svn commit: r647015 -
/lenya/sandbox/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/ElementImpl.java
Author: andreas
Date: Thu Apr 10 16:44:34 2008
New Revision: 647015
URL: http://svn.apache.org/viewvc?rev=647015&view=rev
Log:
Handle case that namespace URIs of elements are null.
Modified:
lenya/sandbox/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/ElementImpl.java
Modified: lenya/sandbox/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/ElementImpl.java
URL: http://svn.apache.org/viewvc/lenya/sandbox/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/ElementImpl.java?rev=647015&r1=647014&r2=647015&view=diff
==============================================================================
--- lenya/sandbox/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/ElementImpl.java (original)
+++ lenya/sandbox/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/ElementImpl.java Thu Apr 10 16:44:34 2008
@@ -36,8 +36,13 @@
for (int i = 0; i < children.length; i++) {
if (children[i] instanceof Element) {
Element element = (Element) children[i];
- if (element.getLocalName().equals(getLocalName())
- && element.getNamespaceUri().equals(getNamespaceUri())) {
+ String otherLocal = element.getLocalName();
+ String local = getLocalName();
+ String otherNs = element.getNamespaceUri();
+ String ns = getNamespaceUri();
+ if (local.equals(otherLocal)
+ && ((ns == null && otherNs == null) || (ns != null && otherNs != null && ns
+ .equals(otherNs)))) {
sameTypeChildren.add(element);
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org