groovy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sun...@apache.org
Subject [groovy] 01/03: Fix hardcoded ASM API version
Date Fri, 29 Nov 2019 05:36:20 GMT
This is an automated email from the ASF dual-hosted git repository.

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

commit a75b89a6271c1b424814af0d7993224ff77204ca
Author: Daniel.Sun <realbluesun@hotmail.com>
AuthorDate: Fri Nov 29 12:15:59 2019 +0800

    Fix hardcoded ASM API version
---
 .../org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/main/java/org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java
b/src/main/java/org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java
index 1462825..7b9e9ca 100644
--- a/src/main/java/org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java
+++ b/src/main/java/org/codehaus/groovy/runtime/callsite/GroovySunClassLoader.java
@@ -18,6 +18,7 @@
  */
 package org.codehaus.groovy.runtime.callsite;
 
+import org.codehaus.groovy.control.CompilerConfiguration;
 import org.codehaus.groovy.reflection.SunClassLoader;
 import org.objectweb.asm.ClassReader;
 import org.objectweb.asm.ClassVisitor;
@@ -59,7 +60,7 @@ public class GroovySunClassLoader extends SunClassLoader {
         final InputStream asStream = GroovySunClassLoader.class.getClassLoader().getResourceAsStream(resName("org.codehaus.groovy.runtime.callsite.AbstractCallSite"));
         ClassReader reader = new ClassReader(asStream);
         final ClassWriter cw = new ClassWriter(ClassWriter.COMPUTE_MAXS);
-        final ClassVisitor cv = new ClassVisitor(4, cw) {
+        final ClassVisitor cv = new ClassVisitor(CompilerConfiguration.ASM_API_VERSION, cw)
{
             public void visit(int version, int access, String name, String signature, String
superName, String[] interfaces) {
                 super.visit(version, access, name, signature, "sun/reflect/GroovyMagic",
interfaces);
             }            


Mime
View raw message