You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by il...@apache.org on 2014/08/13 17:53:23 UTC

git commit: [OLINGO-403] Fix

Repository: olingo-odata4
Updated Branches:
  refs/heads/master 0a80d5146 -> 977905919


[OLINGO-403] Fix


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

Branch: refs/heads/master
Commit: 977905919cbb824b040821fb2f6dd2eeb2777057
Parents: 0a80d51
Author: Francesco Chicchiriccò <--global>
Authored: Wed Aug 13 17:53:10 2014 +0200
Committer: Francesco Chicchiriccò <--global>
Committed: Wed Aug 13 17:53:10 2014 +0200

----------------------------------------------------------------------
 .../org/apache/olingo/ext/proxy/context/EntityUUID.java | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/97790591/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityUUID.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityUUID.java b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityUUID.java
index b825c99..1f6bdf0 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityUUID.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/context/EntityUUID.java
@@ -56,13 +56,11 @@ public class EntityUUID implements Serializable {
     if (type == null || !Serializable.class.isAssignableFrom(type)) {
       throw new IllegalArgumentException("Invalid Entity type class: " + type);
     }
-    for (Class<?> clazz : ClassUtils.hierarchy(type, ClassUtils.Interfaces.INCLUDE)) {
-      if (this.type == null
-              && (clazz.getInterfaces().length == 0
-              || ArrayUtils.contains(clazz.getInterfaces(), Serializable.class)
-              || ArrayUtils.contains(clazz.getInterfaces(), EntityType.class))) {
-
-        this.type = clazz;
+    if (this.type == null) {
+      for (Class<?> clazz : ClassUtils.hierarchy(type, ClassUtils.Interfaces.INCLUDE)) {
+        if (ArrayUtils.contains(clazz.getInterfaces(), EntityType.class)) {
+          this.type = clazz;
+        }
       }
     }
   }