You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by jh...@apache.org on 2013/09/19 14:11:03 UTC

git commit: Fixed reading empty custom elements in entry deserialization

Updated Branches:
  refs/heads/master b591a99a8 -> bb055517c


Fixed reading empty custom elements in entry deserialization

Change-Id: Ice44656598d4f38e6aec3ae2c5d15564a7417134


Project: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/commit/bb055517
Tree: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/tree/bb055517
Diff: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/diff/bb055517

Branch: refs/heads/master
Commit: bb055517c7ed345f5b2594f177d9156d114f038b
Parents: b591a99
Author: Jens Huesken <jh...@apache.org>
Authored: Thu Sep 19 14:08:41 2013 +0200
Committer: Jens Huesken <jh...@apache.org>
Committed: Thu Sep 19 14:08:41 2013 +0200

----------------------------------------------------------------------
 .../apache/olingo/odata2/core/ep/consumer/XmlEntryConsumer.java | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/bb055517/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlEntryConsumer.java
----------------------------------------------------------------------
diff --git a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlEntryConsumer.java b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlEntryConsumer.java
index 996df2a..4d2775e 100644
--- a/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlEntryConsumer.java
+++ b/odata-core/src/main/java/org/apache/olingo/odata2/core/ep/consumer/XmlEntryConsumer.java
@@ -153,10 +153,7 @@ public class XmlEntryConsumer {
           if (customNamespaceURI.equals(xmlNamespaceUri) && customPrefix.equals(xmlPrefix)) {
             skipTag = false;
             reader.require(XMLStreamConstants.START_ELEMENT, customNamespaceURI, tagName);
-            reader.next();
-            reader.require(XMLStreamConstants.CHARACTERS, null, null);
-            final String text = reader.getText();
-            reader.nextTag();
+            final String text = reader.getElementText();
             reader.require(XMLStreamConstants.END_ELEMENT, customNamespaceURI, tagName);
 
             final EntityPropertyInfo propertyInfo = getValidatedPropertyInfo(eia, tagName);