Author: ningjiang
Date: Fri May 18 03:25:06 2012
New Revision: 1339963
URL: http://svn.apache.org/viewvc?rev=1339963&view=rev
Log:
Merged revisions 1339962 via svnmerge from
https://svn.apache.org/repos/asf/camel/trunk
........
r1339962 | ningjiang | 2012-05-18 11:13:35 +0800 (Fri, 18 May 2012) | 1 line
CAMEL-5276 Fix the issue that the ObjectHelper will return false for a node
without children
........
Modified:
camel/branches/camel-2.9.x/ (props changed)
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Merged /camel/trunk:r1339962
Propchange: camel/branches/camel-2.9.x/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.
Modified:
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
URL:
http://svn.apache.org/viewvc/camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java?rev=1339963&r1=1339962&r2=1339963&view=diff
==============================================================================
---
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
(original)
+++
camel/branches/camel-2.9.x/camel-core/src/main/java/org/apache/camel/util/ObjectHelper.java
Fri May 18 03:25:06 2012
@@ -1196,7 +1196,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) {