You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Paul King (Jira)" <ji...@apache.org> on 2022/05/10 11:03:00 UTC

[jira] [Commented] (GROOVY-10201) JDK 17: class String1_groovyProxy cannot implement sealed interface java.lang.constant.ConstantDesc

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

Paul King commented on GROOVY-10201:
------------------------------------

I cherry-picked part of those changes onto the GROOVY_3_0_X branch. Any chance you could check a snapshot version? I am assuming the bits I didn't bring across aren't critical to your problem.

Our JFrog snapshot repo for 3.0.x seems MIA again today. I have sent JFrog a message. When it's back up, I'll check that the snapshot was published successfully and then it would be great if you could try it out. I haven't included a simple reproducer test yet either.

> JDK 17: class String1_groovyProxy cannot implement sealed interface java.lang.constant.ConstantDesc
> ---------------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-10201
>                 URL: https://issues.apache.org/jira/browse/GROOVY-10201
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.9
>            Reporter: Peter Burka
>            Priority: Major
>
> Doing early testing of some Groovy applications on Java 17 (ea31), and I'm encountering some exceptions like the following in unit tests. I'm testing on the 3.0.9 branch since 3.0.8 can't compile many of our Groovy classes against Java 17.
> {code:java}
> java.lang.IncompatibleClassChangeError: class String1_groovyProxy cannot implement sealed interface java.lang.constant.ConstantDesc
>        java.base/java.lang.ClassLoader.defineClass1(Native Method)
>        java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1012)
>        java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:874)
>        org.codehaus.groovy.runtime.ProxyGeneratorAdapter$InnerLoader.defineClass(ProxyGeneratorAdapter.java:847)
>        org.codehaus.groovy.runtime.ProxyGeneratorAdapter.<init>(ProxyGeneratorAdapter.java:192)
>        groovy.util.ProxyGenerator.lambda$createAdapter$0(ProxyGenerator.java:234)
>        org.apache.groovy.util.concurrent.concurrentlinkedhashmap.ConcurrentLinkedHashMap.lambda$compute$0(ConcurrentLinkedHashMap.java:788)
>        java.base/java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1708)
>        org.apache.groovy.util.concurrent.concurrentlinkedhashmap.ConcurrentLinkedHashMap.compute(ConcurrentLinkedHashMap.java:800)
>        org.apache.groovy.util.concurrent.concurrentlinkedhashmap.ConcurrentLinkedHashMap.computeIfAbsent(ConcurrentLinkedHashMap.java:777)
>        org.codehaus.groovy.runtime.memoize.LRUCache.getAndPut(LRUCache.java:63)
>        groovy.util.ProxyGenerator.createAdapter(ProxyGenerator.java:230)
>        groovy.util.ProxyGenerator.instantiateDelegateWithBaseClass(ProxyGenerator.java:205)
>        groovy.util.ProxyGenerator.instantiateDelegateWithBaseClass(ProxyGenerator.java:189)
>        groovy.util.ProxyGenerator.instantiateDelegate(ProxyGenerator.java:181)
>        groovy.util.ProxyGenerator.instantiateDelegate(ProxyGenerator.java:177)
>        org.codehaus.groovy.runtime.DefaultGroovyMethods.asType(DefaultGroovyMethods.java:17910)
>        org.codehaus.groovy.runtime.StringGroovyMethods.asType(StringGroovyMethods.java:208)
>        org.codehaus.groovy.runtime.dgm$1158.doMethodInvoke(Unknown Source)
>        groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1268)
> {code}
> I haven't tried to create a simple reproducer, but am happy to try to do so if the problem isn't already known or obvious.



--
This message was sent by Atlassian Jira
(v8.20.7#820007)