groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject groovy git commit: GROOVY-8235: JSR308 avoid compiler errors for legacy versions
Date Wed, 21 Jun 2017 03:28:31 GMT
Repository: groovy
Updated Branches:
  refs/heads/GROOVY_2_4_X 37dd1ac51 -> a9fe0acd0


GROOVY-8235: JSR308 avoid compiler errors for legacy versions


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

Branch: refs/heads/GROOVY_2_4_X
Commit: a9fe0acd0efe1d36589c378cd929ec7a9d7ca68c
Parents: 37dd1ac
Author: paulk <paulk@asert.com.au>
Authored: Wed Jun 21 13:28:21 2017 +1000
Committer: paulk <paulk@asert.com.au>
Committed: Wed Jun 21 13:28:21 2017 +1000

----------------------------------------------------------------------
 src/main/org/codehaus/groovy/vmplugin/v5/Java5.java | 5 +++++
 1 file changed, 5 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/groovy/blob/a9fe0acd/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
----------------------------------------------------------------------
diff --git a/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java b/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
index d769b7b..069a3a5 100644
--- a/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
+++ b/src/main/org/codehaus/groovy/vmplugin/v5/Java5.java
@@ -338,6 +338,11 @@ public class Java5 implements VMPlugin {
             case PACKAGE:
                 return AnnotationNode.PACKAGE_TARGET;
             default:
+                if ("TYPE_USE".equals(value.name()) || "TYPE_PARAMETER".equals(value.name())
|| "MODULE".equals(value.name())) {
+                    // return 0 value because we are binary or'ing this and want to ignore
without failing
+                    // later version plugins will override and provide sensible values for
jdk8+
+                    return 0;
+                }
                 throw new GroovyBugError("unsupported Target " + value);
         }
     }


Mime
View raw message