cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dk...@apache.org
Subject cxf-xjc-utils git commit: Update the bug986 plugin to remove the annotation in more cases
Date Wed, 08 Jul 2015 19:39:01 GMT
Repository: cxf-xjc-utils
Updated Branches:
  refs/heads/master 48db284e9 -> ad38d5a3b


Update the bug986 plugin to remove the annotation in more cases


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

Branch: refs/heads/master
Commit: ad38d5a3bfe86c76927845dfc4ac13b77216bd78
Parents: 48db284
Author: Daniel Kulp <dkulp@apache.org>
Authored: Wed Jul 8 15:38:39 2015 -0400
Committer: Daniel Kulp <dkulp@apache.org>
Committed: Wed Jul 8 15:38:39 2015 -0400

----------------------------------------------------------------------
 .../java/org/apache/cxf/xjc/bug986/Bug986Plugin.java  | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf-xjc-utils/blob/ad38d5a3/bug986/src/main/java/org/apache/cxf/xjc/bug986/Bug986Plugin.java
----------------------------------------------------------------------
diff --git a/bug986/src/main/java/org/apache/cxf/xjc/bug986/Bug986Plugin.java b/bug986/src/main/java/org/apache/cxf/xjc/bug986/Bug986Plugin.java
index 7f48ea5..7120355 100644
--- a/bug986/src/main/java/org/apache/cxf/xjc/bug986/Bug986Plugin.java
+++ b/bug986/src/main/java/org/apache/cxf/xjc/bug986/Bug986Plugin.java
@@ -81,10 +81,16 @@ public class Bug986Plugin {
                         JAnnotationValue st = getAnnotationMember(j, "name");
                         StringWriter sw = new StringWriter();
                         st.generate(new JFormatter(sw));
-                        if (sw.toString().equals("\"anySimpleType\"")
-                            && field.type().fullName().startsWith("java.util.List")
-                            && !field.type().fullName().contains("<java.lang.String>"))
{
-                            toRemove.add(j);
+                        if (sw.toString().equals("\"anySimpleType\"")) {
+                            if (field.type().fullName().startsWith("java.util.List")) {
+                                //if it's a list of non-string types, we have to remove
+                                if (!!field.type().fullName().contains("<java.lang.String>"))
{
+                                    toRemove.add(j);
+                                }
+                            } else if (!"java.lang.String".equals(field.type().fullName()))
{
+                                //if it's not a list and it's not a string, we have to remove
+                                toRemove.add(j);
+                            }
                         }
                     }
                 }


Mime
View raw message