groovy-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul King (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (GROOVY-8494) CLONE - Calling Stream.of from groovy class in JDK 9 fails
Date Wed, 07 Mar 2018 06:06:00 GMT

     [ https://issues.apache.org/jira/browse/GROOVY-8494?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Paul King updated GROOVY-8494:
------------------------------
    Description: 
Various examples still cause problems with 2_4_X for static methods on interfaces.
Prior to GROOVY-8338 these examples worked on JDK8 but failed on JDK9 (for all versions of
Groovy) with errors like:
{noformat}
java.lang.IncompatibleClassChangeError: Method java.util.stream.Stream.of(Ljava/lang/Object;)Ljava/util/stream/Stream;
must be InterfaceMethodref constant
	at java_util_stream_Stream$of.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at Ex1.main(ConsoleScript1:5)
{noformat}
Now, the examples work on versions of 2_5_X+ with the GROOVY-8338 fix applied but fail on
2_4_X.

Example 1:
{code:groovy}
import java.util.stream.Stream

class Ex1 {
    static void main(String[] args) {
        Stream.of("1").forEach{ println it }
    }
}
{code}

Example 2:
{code:groovy}
import java.util.function.Function
Function<Integer, Integer> function = Function.identity()
{code}

2.6.0-alpha-3, latest 2_6_X, latest 2_5_X and master all run successfully.
2.5.0-beta-3 doesn't have the GROOVY-8338 fix applied.

Ex1 on jdk8_161 with latest 2_4_X:
{noformat}
java.lang.VerifyError: (class: java_util_stream_Stream$of, method: call signature: (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;)
Illegal type in constant pool
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
	at java.lang.Class.getConstructor0(Class.java:3075)
	at java.lang.Class.getConstructor(Class.java:1825)
	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
	at Ex1.main(ConsoleScript3:6)
{noformat}
Ex2 on jdk8_161 with latest 2_4_X:
{noformat}
java.lang.VerifyError: (class: java_util_function_Function$identity$1, method: call signature:
(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
	at java.lang.Class.getConstructor0(Class.java:3075)
	at java.lang.Class.getConstructor(Class.java:1825)
	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
	at ConsoleScript4.run(ConsoleScript4:11)
{noformat}
Ex1 on JDK9.0.4 with latest 2_4_X:
{noformat}
java.lang.VerifyError: (class: java_util_stream_Stream$of, method: callStatic signature: (Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;)
Illegal type in constant pool
	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
	at java.base/java.lang.Class.getConstructor0(Class.java:3315)
	at java.base/java.lang.Class.getConstructor(Class.java:2108)
	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
	at Ex1.main(ConsoleScript0:6)
{noformat}
Ex2 on JDK9.0.4 with latest 2_4_X:
{noformat}
java.lang.VerifyError: (class: java_util_function_Function$identity, method: callStatic signature:
(Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool
	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
	at java.base/java.lang.Class.getConstructor0(Class.java:3315)
	at java.base/java.lang.Class.getConstructor(Class.java:2108)
	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
	at ConsoleScript1.run(ConsoleScript1:11)
{noformat}



  was:
Various examples still cause problems with 2_4_X for static methods on interfaces.
Prior to GROOVY-8338 these examples worked on JDK8 but failed on JDK9 (for all versions of
Groovy) with errors like:
{noformat}
java.lang.IncompatibleClassChangeError: Method java.util.stream.Stream.of(Ljava/lang/Object;)Ljava/util/stream/Stream;
must be InterfaceMethodref constant
	at java_util_stream_Stream$of.call(Unknown Source)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
	at Ex1.main(ConsoleScript1:5)
{noformat}
Now, the examples work on versions of 2_5_X+ with the GROOVY-8338 fix applied but fail on
2_4_X.

Example 1:
{code:groovy}
import java.util.stream.Stream

class Ex1 {
    static void main(String[] args) {
        Stream.of("1").forEach{ println it }
    }
}
{code}

Example 2:
{code:groovy}
import java.util.function.Function
Function<Integer, Integer> function = Function.identity()
{code}

2.6.0-alpha-3 and latest 2_6_X: both run successfully

Ex1 on jdk8_161 with latest 2_4_X:
{noformat}
java.lang.VerifyError: (class: java_util_stream_Stream$of, method: call signature: (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;)
Illegal type in constant pool
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
	at java.lang.Class.getConstructor0(Class.java:3075)
	at java.lang.Class.getConstructor(Class.java:1825)
	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
	at Ex1.main(ConsoleScript3:6)
{noformat}
Ex2 on jdk8_161 with latest 2_4_X:
{noformat}
java.lang.VerifyError: (class: java_util_function_Function$identity$1, method: call signature:
(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
	at java.lang.Class.getConstructor0(Class.java:3075)
	at java.lang.Class.getConstructor(Class.java:1825)
	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
	at ConsoleScript4.run(ConsoleScript4:11)
{noformat}
Ex1 on JDK9.0.4 with latest 2_4_X:
{noformat}
java.lang.VerifyError: (class: java_util_stream_Stream$of, method: callStatic signature: (Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;)
Illegal type in constant pool
	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
	at java.base/java.lang.Class.getConstructor0(Class.java:3315)
	at java.base/java.lang.Class.getConstructor(Class.java:2108)
	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
	at Ex1.main(ConsoleScript0:6)
{noformat}
Ex2 on JDK9.0.4 with latest 2_4_X:
{noformat}
java.lang.VerifyError: (class: java_util_function_Function$identity, method: callStatic signature:
(Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool
	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
	at java.base/java.lang.Class.getConstructor0(Class.java:3315)
	at java.base/java.lang.Class.getConstructor(Class.java:2108)
	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
	at ConsoleScript1.run(ConsoleScript1:11)
{noformat}




> CLONE - Calling Stream.of from groovy class in JDK 9 fails
> ----------------------------------------------------------
>
>                 Key: GROOVY-8494
>                 URL: https://issues.apache.org/jira/browse/GROOVY-8494
>             Project: Groovy
>          Issue Type: Bug
>          Components: groovy-runtime
>    Affects Versions: 2.4.12, 2.4.13, 2.4.14
>            Reporter: Marcus Nylander
>            Priority: Major
>
> Various examples still cause problems with 2_4_X for static methods on interfaces.
> Prior to GROOVY-8338 these examples worked on JDK8 but failed on JDK9 (for all versions
of Groovy) with errors like:
> {noformat}
> java.lang.IncompatibleClassChangeError: Method java.util.stream.Stream.of(Ljava/lang/Object;)Ljava/util/stream/Stream;
must be InterfaceMethodref constant
> 	at java_util_stream_Stream$of.call(Unknown Source)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:48)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:113)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:125)
> 	at Ex1.main(ConsoleScript1:5)
> {noformat}
> Now, the examples work on versions of 2_5_X+ with the GROOVY-8338 fix applied but fail
on 2_4_X.
> Example 1:
> {code:groovy}
> import java.util.stream.Stream
> class Ex1 {
>     static void main(String[] args) {
>         Stream.of("1").forEach{ println it }
>     }
> }
> {code}
> Example 2:
> {code:groovy}
> import java.util.function.Function
> Function<Integer, Integer> function = Function.identity()
> {code}
> 2.6.0-alpha-3, latest 2_6_X, latest 2_5_X and master all run successfully.
> 2.5.0-beta-3 doesn't have the GROOVY-8338 fix applied.
> Ex1 on jdk8_161 with latest 2_4_X:
> {noformat}
> java.lang.VerifyError: (class: java_util_stream_Stream$of, method: call signature: (Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;)
Illegal type in constant pool
> 	at java.lang.Class.getDeclaredConstructors0(Native Method)
> 	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
> 	at java.lang.Class.getConstructor0(Class.java:3075)
> 	at java.lang.Class.getConstructor(Class.java:1825)
> 	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
> 	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
> 	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
> 	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
> 	at Ex1.main(ConsoleScript3:6)
> {noformat}
> Ex2 on jdk8_161 with latest 2_4_X:
> {noformat}
> java.lang.VerifyError: (class: java_util_function_Function$identity$1, method: call signature:
(Ljava/lang/Object;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool
> 	at java.lang.Class.getDeclaredConstructors0(Native Method)
> 	at java.lang.Class.privateGetDeclaredConstructors(Class.java:2671)
> 	at java.lang.Class.getConstructor0(Class.java:3075)
> 	at java.lang.Class.getConstructor(Class.java:1825)
> 	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
> 	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
> 	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
> 	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
> 	at ConsoleScript4.run(ConsoleScript4:11)
> {noformat}
> Ex1 on JDK9.0.4 with latest 2_4_X:
> {noformat}
> java.lang.VerifyError: (class: java_util_stream_Stream$of, method: callStatic signature:
(Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant pool
> 	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
> 	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
> 	at java.base/java.lang.Class.getConstructor0(Class.java:3315)
> 	at java.base/java.lang.Class.getConstructor(Class.java:2108)
> 	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
> 	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
> 	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
> 	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:128)
> 	at Ex1.main(ConsoleScript0:6)
> {noformat}
> Ex2 on JDK9.0.4 with latest 2_4_X:
> {noformat}
> java.lang.VerifyError: (class: java_util_function_Function$identity, method: callStatic
signature: (Ljava/lang/Class;[Ljava/lang/Object;)Ljava/lang/Object;) Illegal type in constant
pool
> 	at java.base/java.lang.Class.getDeclaredConstructors0(Native Method)
> 	at java.base/java.lang.Class.privateGetDeclaredConstructors(Class.java:3110)
> 	at java.base/java.lang.Class.getConstructor0(Class.java:3315)
> 	at java.base/java.lang.Class.getConstructor(Class.java:2108)
> 	at org.codehaus.groovy.reflection.ClassLoaderForClassArtifacts.defineClassAndGetConstructor(ClassLoaderForClassArtifacts.java:82)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteGenerator.compileStaticMethod(CallSiteGenerator.java:262)
> 	at org.codehaus.groovy.reflection.CachedMethod.createStaticMetaMethodSite(CachedMethod.java:295)
> 	at org.codehaus.groovy.runtime.callsite.StaticMetaMethodSite.createStaticMetaMethodSite(StaticMetaMethodSite.java:114)
> 	at groovy.lang.MetaClassImpl.createStaticSite(MetaClassImpl.java:3421)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallStaticSite(CallSiteArray.java:76)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.createCallSite(CallSiteArray.java:161)
> 	at org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCall(CallSiteArray.java:47)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:116)
> 	at org.codehaus.groovy.runtime.callsite.AbstractCallSite.call(AbstractCallSite.java:120)
> 	at ConsoleScript1.run(ConsoleScript1:11)
> {noformat}



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

Mime
View raw message