You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by fm...@apache.org on 2014/08/18 15:05:07 UTC
git commit: [OLINGO-403] fixed
Repository: olingo-odata4
Updated Branches:
refs/heads/master 853bad6aa -> 58619c966
[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/master
Commit: 58619c966898c346018d2a4449e794b12df158eb
Parents: 853bad6
Author: fmartelli <fa...@gmail.com>
Authored: Mon Aug 18 15:04:55 2014 +0200
Committer: fmartelli <fa...@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();