You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by as...@apache.org on 2016/03/02 17:32:30 UTC

[1/2] cxf git commit: handle arrays of generics

Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 1d802c274 -> 807605c33


handle arrays of generics


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

Branch: refs/heads/3.0.x-fixes
Commit: 51223721d3b3e0b980b804971f510ad7c0d14186
Parents: 1d802c2
Author: Chris Dolphy <ch...@redhat.com>
Authored: Thu Feb 25 22:33:32 2016 -0600
Committer: Alessio Soldano <as...@redhat.com>
Committed: Wed Mar 2 17:26:46 2016 +0100

----------------------------------------------------------------------
 .../apache/cxf/jaxb/JAXBContextInitializer.java    | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/51223721/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
----------------------------------------------------------------------
diff --git a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
index 902d0a8..62a14a6 100644
--- a/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
+++ b/rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/JAXBContextInitializer.java
@@ -251,6 +251,21 @@ class JAXBContextInitializer extends ServiceModelVisitor {
             Type componentType = gt.getGenericComponentType();
             if (componentType instanceof Class) {
                 ct = (Class<?>)componentType;
+            } else if (componentType instanceof ParameterizedType) {
+                final ParameterizedType parameterizedType = (ParameterizedType)componentType;
+                final Type rawType = parameterizedType.getRawType();
+                if (rawType instanceof Class) {
+                    ct = (Class<?>)rawType;
+                } else {
+                    throw new IllegalArgumentException("Unable to determine type for " + rawType);
+                }
+                if (!parameterizedType.getRawType().equals(Enum.class)) {
+                    for (Type t2 : parameterizedType.getActualTypeArguments()) {
+                        if (shouldTypeBeAdded(t2, parameterizedType)) {
+                            addType(t2);
+                        }
+                    }
+                }
             } else {
                 TypeVariable<?> tv = (TypeVariable<?>)componentType;
                 Type[] bounds = tv.getBounds();
@@ -592,4 +607,4 @@ class JAXBContextInitializer extends ServiceModelVisitor {
     }
     
     
-}
\ No newline at end of file
+}


[2/2] cxf git commit: Recording .gitmergeinfo Changes

Posted by as...@apache.org.
Recording .gitmergeinfo Changes


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/807605c3
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/807605c3
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/807605c3

Branch: refs/heads/3.0.x-fixes
Commit: 807605c33fdaf829b54196b8e9b8143486e35a24
Parents: 5122372
Author: Alessio Soldano <as...@redhat.com>
Authored: Wed Mar 2 17:27:59 2016 +0100
Committer: Alessio Soldano <as...@redhat.com>
Committed: Wed Mar 2 17:27:59 2016 +0100

----------------------------------------------------------------------
 .gitmergeinfo | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/807605c3/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 62f1a3f..cdf8db4 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -904,6 +904,7 @@ M 5a9a2a09887c69cdfeff5eac22996ab35fbfc0cf
 M 5b20a3c909440bab1f0080a0b4b414fef6a6d4b9
 M 5d436c40e8be07ffdb336344692580faa5833586
 M 5e4a14b4da1f1b27e4df811be80a7f11fc6dae8d
+M 5e7b2c1700dde193391f994b47abba10dcc0d2b1
 M 5e919271e2e92f9845d6454b37ab0b86cfc66591
 M 5e97d1e29e85d80f0679748cc4df0d8e0647ee16
 M 5fbe7b49b88deff15f755c15f5a4c421943acc4f