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 2009/06/26 16:11:05 UTC
svn commit: r788710 -
/lenya/docu/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/NamedXmlNodeImpl.java
Author: andreas
Date: Fri Jun 26 14:11:05 2009
New Revision: 788710
URL: http://svn.apache.org/viewvc?rev=788710&view=rev
Log:
Catch null local names in diff module.
Modified:
lenya/docu/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/NamedXmlNodeImpl.java
Modified: lenya/docu/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/NamedXmlNodeImpl.java
URL: http://svn.apache.org/viewvc/lenya/docu/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/NamedXmlNodeImpl.java?rev=788710&r1=788709&r2=788710&view=diff
==============================================================================
--- lenya/docu/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/NamedXmlNodeImpl.java (original)
+++ lenya/docu/modules/diff/java/src/org/apache/lenya/modules/diff/xml/impl/NamedXmlNodeImpl.java Fri Jun 26 14:11:05 2009
@@ -41,8 +41,14 @@
NamedXmlNodeImpl otherNode = (NamedXmlNodeImpl) comparable;
String otherNs = otherNode.getNamespaceUri();
String ns = getNamespaceUri();
+
+ String otherLocalName = otherNode.getLocalName();
+ otherLocalName = otherLocalName == null ? "<NULL>" : otherLocalName;
+ String localName = getLocalName();
+ localName = localName == null ? "<NULL>" : localName;
+
return ((ns == null && otherNs == null) || ns.equals(otherNs))
- && otherNode.getLocalName().equals(getLocalName());
+ && otherLocalName.equals(localName);
}
public static final String getKey(String namespaceUri, String localName) {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org