olingo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m...@apache.org
Subject [2/7] git commit: [OLINGO-403] fixed
Date Mon, 01 Sep 2014 06:34:33 GMT
[OLINGO-403] fixed


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

Branch: refs/heads/OLINGO-406
Commit: 58619c966898c346018d2a4449e794b12df158eb
Parents: 853bad6
Author: fmartelli <fabio.martelli@gmail.com>
Authored: Mon Aug 18 15:04:55 2014 +0200
Committer: fmartelli <fabio.martelli@gmail.com>
Committed: Mon Aug 18 15:04:55 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/olingo-odata4/blob/58619c96/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ClassUtils.java
----------------------------------------------------------------------
diff --git a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ClassUtils.java
b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ClassUtils.java
index 8d5c08c..d22eb28 100644
--- a/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ClassUtils.java
+++ b/ext/client-proxy/src/main/java/org/apache/olingo/ext/proxy/utils/ClassUtils.java
@@ -32,6 +32,7 @@ import java.lang.reflect.Constructor;
 import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Proxy;
 import java.lang.reflect.Type;
 import java.lang.reflect.TypeVariable;
 import java.util.HashSet;
@@ -49,6 +50,10 @@ public final class ClassUtils {
   }
 
   public static Type[] extractGenericType(final Class<?> paramType, final Class<?>...
references) {
+    if (Proxy.class.isAssignableFrom(paramType)) {
+      return extractGenericType(Class.class.cast(paramType.getGenericInterfaces()[0]), references);
+    }
+
     if (paramType.getGenericInterfaces().length > 0) {
       if (references == null || references.length == 0) {
         return ((ParameterizedType) paramType.getGenericInterfaces()[0]).getActualTypeArguments();


Mime
View raw message