This is an automated email from the ASF dual-hosted git repository.

paulk pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/groovy.git


The following commit(s) were added to refs/heads/master by this push:
     new 19ad9b6  fix unintentional glitch on JDK14
19ad9b6 is described below

commit 19ad9b63bad3d69b1855f79340c26380a8391756
Author: Paul King <[email protected]>
AuthorDate: Sun Jul 19 21:39:33 2020 +1000

    fix unintentional glitch on JDK14
---
 src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java 
b/src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java
index a004a67..9249449 100644
--- a/src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java
+++ b/src/main/java/org/codehaus/groovy/vmplugin/v9/Java9.java
@@ -188,6 +188,16 @@ public class Java9 extends Java8 {
         return 9;
     }
 
+    @Override
+    public Object getInvokeSpecialHandle(Method method, Object receiver) {
+        final Class<?> receiverType = receiver.getClass();
+        try {
+            return of(receiverType).unreflectSpecial(method, 
receiverType).bindTo(receiver);
+        } catch (ReflectiveOperationException e) {
+            return super.getInvokeSpecialHandle(method, receiver);
+        }
+    }
+
     /**
      * This method may be used by a caller in class C to check whether to 
enable access to a member of declaring class D successfully
      * if {@link 
Java8#checkCanSetAccessible(java.lang.reflect.AccessibleObject, 
java.lang.Class)} returns true and any of the following hold:

Reply via email to