Quantcast

[GitHub] groovy pull request #523: cleanup now that jdk7 is baseline

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] groovy pull request #523: cleanup now that jdk7 is baseline

jwagenleitner-3
GitHub user jwagenleitner opened a pull request:

    https://github.com/apache/groovy/pull/523

    cleanup now that jdk7 is baseline

    Avoids reflective checks/constructions where it is no longer needed since 7 is now baseline in 2_5_X and master.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jwagenleitner/groovy cleanup-jdk7

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/groovy/pull/523.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #523
   
----
commit 0982b7927f463cc98f8019576a7e1375e8d7a2c6
Author: John Wagenleitner <[hidden email]>
Date:   2017-04-12T02:43:14Z

    cleanup now that jdk7 is baseline

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] groovy pull request #523: cleanup now that jdk7 is baseline

jwagenleitner-3
Github user blackdrag commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/523#discussion_r111070966
 
    --- Diff: src/main/org/codehaus/groovy/vmplugin/VMPluginFactory.java ---
    @@ -26,39 +28,10 @@
      */
     public class VMPluginFactory {
     
    -    private static final String JDK5_CLASSNAME_CHECK = "java.lang.annotation.Annotation";
    -    private static final String JDK6_CLASSNAME_CHECK = "javax.script.ScriptEngine";
    -    private static final String JDK7_CLASSNAME_CHECK = "java.util.Objects";
    -
    -    private static final String JDK5_PLUGIN_NAME = "org.codehaus.groovy.vmplugin.v5.Java5";
    -    private static final String JDK6_PLUGIN_NAME = "org.codehaus.groovy.vmplugin.v6.Java6";
    -    private static final String JDK7_PLUGIN_NAME = "org.codehaus.groovy.vmplugin.v7.Java7";
    -
    -    private static VMPlugin plugin;
    -
    -    static {
    -        plugin = createPlugin(JDK7_CLASSNAME_CHECK, JDK7_PLUGIN_NAME);
    -        if (plugin == null) {
    -            // v6 plugin is the same as v5 but with some scripting stuff
    -            // so check below is good enough for now (can be true for JVM 5)
    -            plugin = createPlugin(JDK6_CLASSNAME_CHECK, JDK6_PLUGIN_NAME);
    -        }
    -        if (plugin == null) {
    -            plugin = createPlugin(JDK5_CLASSNAME_CHECK, JDK5_PLUGIN_NAME);
    -        }
    -    }
    +    private static final VMPlugin plugin = new Java7();
     
         public static VMPlugin getPlugin() {
             return plugin;
         }
     
    -    private static VMPlugin createPlugin(String classNameCheck, String pluginName) {
    --- End diff --
   
    we will still need this for the JDK9 plugin


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[GitHub] groovy pull request #523: cleanup now that jdk7 is baseline

jwagenleitner-3
In reply to this post by jwagenleitner-3
Github user asfgit closed the pull request at:

    https://github.com/apache/groovy/pull/523


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [hidden email] or file a JIRA ticket
with INFRA.
---
Loading...