You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by ch...@apache.org on 2016/07/26 10:04:31 UTC

olingo-odata4 git commit: [OLINGO-984] Client-Proxy: collection of enums as property not supported

Repository: olingo-odata4
Updated Branches:
  refs/heads/master 756ae564e -> a75743601


[OLINGO-984] Client-Proxy: collection of enums as property not supported

Signed-off-by: Christian Amend <ch...@sap.com>


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

Branch: refs/heads/master
Commit: a757436015ff0dc55db3145b8102b762eebeffce
Parents: 756ae56
Author: Frederik Zimmer <fr...@partake.de>
Authored: Fri Jul 22 17:05:42 2016 +0200
Committer: Christian Amend <ch...@sap.com>
Committed: Tue Jul 26 11:57:02 2016 +0200

----------------------------------------------------------------------
 .../main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java   | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/a7574360/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
index 8f804fe..b50c700 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/CoreUtils.java
@@ -597,6 +597,10 @@ public final class CoreUtils {
               ComplexInvocationHandler.getInstance(itemValue.asComplex(), internalRef, service));
 
           collection.add(collItem);
+        } else if (itemValue.isEnum()) {
+          collection.add(CoreUtils.enumValueToObject(itemValue.asEnum(), ref));
+        } else {
+          throw new RuntimeException("Unsupported collection item type " + itemValue.getTypeName());
         }
       }