|
From: <nri...@us...> - 2014-12-03 16:26:19
|
Revision: 261
http://sourceforge.net/p/xmlfield/code/261
Author: nricheton
Date: 2014-12-03 16:26:16 +0000 (Wed, 03 Dec 2014)
Log Message:
-----------
Fix for empty array
Modified Paths:
--------------
trunk/xmlfield-core/src/main/java/org/xmlfield/core/internal/XmlFieldInvocationHandler.java
Modified: trunk/xmlfield-core/src/main/java/org/xmlfield/core/internal/XmlFieldInvocationHandler.java
===================================================================
--- trunk/xmlfield-core/src/main/java/org/xmlfield/core/internal/XmlFieldInvocationHandler.java 2014-12-03 16:24:56 UTC (rev 260)
+++ trunk/xmlfield-core/src/main/java/org/xmlfield/core/internal/XmlFieldInvocationHandler.java 2014-12-03 16:26:16 UTC (rev 261)
@@ -639,7 +639,8 @@
XmlFieldNode n;
- if (value == null) {
+ if (value == null || value instanceof Object[]
+ && ((Object[]) value).length == 0) {
// Value is null. We have to delete the current value.
n = xmlField._getSelector().selectXPathToNode(namespaces,
fieldXPath, node);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|