Author: ningjiang
Date: Fri May 18 03:13:35 2012
New Revision: 1339962
URL: http://svn.apache.org/viewvc?rev=1339962&view=rev
Log:
CAMEL-5276 Fix the issue that the ObjectHelper will return false for a node
without children
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
Modified:
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL:
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=1339962&r1=1339961&r2=1339962&view=diff
==============================================================================
---
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
(original)
+++
camel/trunk/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
Fri May 18 03:13:35 2012
@@ -1227,7 +1227,10 @@ public final class ObjectHelper {
return false;
}
} else if (value instanceof NodeList) {
- // is it an empty dom
+ // is it an empty dom with empty attributes
+ if (value instanceof Node && ((Node)value).hasAttributes()) {
+ return true;
+ }
NodeList list = (NodeList) value;
return list.getLength() > 0;
} else if (value instanceof Collection) {