groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (GROOVY-8843) Fix illegal reflective access within o.c.g.vmplugin.v7.Java7
Date Mon, 15 Oct 2018 21:50:00 GMT

    [ https://issues.apache.org/jira/browse/GROOVY-8843?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16650849#comment-16650849
] 

ASF GitHub Bot commented on GROOVY-8843:
----------------------------------------

Github user paulk-asert commented on a diff in the pull request:

    https://github.com/apache/groovy/pull/811#discussion_r225328503
  
    --- Diff: src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java ---
    @@ -18,14 +18,78 @@
      */
     package org.codehaus.groovy.vmplugin.v9;
     
    +import org.codehaus.groovy.GroovyBugError;
     import org.codehaus.groovy.vmplugin.v8.Java8;
     
    +import java.lang.invoke.MethodHandles;
    +import java.lang.reflect.Constructor;
    +import java.lang.reflect.InvocationTargetException;
    +import java.lang.reflect.Method;
    +
     /**
    - * Java 9 based functions will be added here if needed.
    + * Additional Java 9 based functions will be added here as needed.
      */
     public class Java9 extends Java8 {
    +
    +    private static class LookupHolder {
    +        private static final Method PRIVATE_LOOKUP;
    +        private static final Constructor<MethodHandles.Lookup> LOOKUP_Constructor;
    +        static {
    +            Constructor<MethodHandles.Lookup> lookup = null;
    +            Method privateLookup = null;
    +            try { // java 9
    +                privateLookup = MethodHandles.class.getMethod("privateLookupIn", Class.class,
MethodHandles.Lookup.class);
    --- End diff --
    
    We don't eventually, I was just letting the build be built from Java 8 (with current warnings)
until we get more things in place.


> Fix illegal reflective access within o.c.g.vmplugin.v7.Java7
> ------------------------------------------------------------
>
>                 Key: GROOVY-8843
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8843
>             Project: Groovy
>          Issue Type: Sub-task
>            Reporter: Paul King
>            Priority: Major
>




--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message