[jira] [Updated] (GROOVY-10214) Update from Groovy 3.0.8 to 3.0.9 breaks category class

2022-07-23 Thread Eric Milles (Jira)


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

Eric Milles updated GROOVY-10214:
-
Fix Version/s: (was: 5.0.0-alpha-1)

> Update from Groovy 3.0.8 to 3.0.9 breaks category class
> ---
>
> Key: GROOVY-10214
> URL: https://issues.apache.org/jira/browse/GROOVY-10214
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.9, 4.0.0
> Environment: java --version
> openjdk 16.0.2 2021-07-20
> OpenJDK Runtime Environment Temurin-16.0.2+7 (build 16.0.2+7)
> OpenJDK 64-Bit Server VM Temurin-16.0.2+7 (build 16.0.2+7, mixed mode, 
> sharing)
>Reporter: Alexander Veit
>Assignee: Eric Milles
>Priority: Major
> Fix For: 4.0.3
>
>
> We have a category class as part of our product's Groovy API that breaks 
> after the update from Groovy 3.0.8 (indy) to 3.0.9 (indy).
> Scripts that call the category class with Integer of Long arguments throw an 
> exception. E.g.
> {code:java}
> use (org.example.Convert)
> {
>   assert '1234' == 1234.canonicalLexicalRepresentation
> }
> {code}
> throws
> {noformat}
> java.lang.IllegalArgumentException: argument type mismatch
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:567)
>   at 
> org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:54)
>   at 
> org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod.invoke(NewInstanceMetaMethod.java:54)
>   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
>   at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1956)
>   at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3843)
>   at 
> org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:199)
>   at 
> org.codehaus.groovy.runtime.callsite.PojoMetaClassGetPropertySite.getProperty(PojoMetaClassGetPropertySite.java:36)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
>   at 
> org.example.test.testInteger$_run_closure1.doCall(testInteger.groovy:5)
>   at org.example.test.testInteger$_run_closure1.doCall(testInteger.groovy)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:567)
>   at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
>   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
>   at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
>   at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
>   at groovy.lang.Closure.call(Closure.java:412)
>   at groovy.lang.Closure.call(Closure.java:406)
>   at 
> org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:123)
>   at 
> org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.access$300(GroovyCategorySupport.java:72)
>   at 
> org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:258)
>   at 
> org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:568)
>   at org.codehaus.groovy.runtime.dgm$880.invoke(Unknown Source)
>   at 
> org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:226)
>   at 
> org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:61)
>   at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:194)
>   at org.example.test.testInteger.run(testInteger.groovy:3)
>   at groovy.lang.GroovyShell.evaluate(GroovyShell.java:427)
>   at groovy.lang.GroovyShell.evaluate(GroovyShell.java:470)
> {noformat}
> The categoy class is implemented in Java and looks something like
> {code:java}
> public final class Convert
> {
>   private Convert()
>   {
>   }
>   

[jira] [Updated] (GROOVY-10214) Update from Groovy 3.0.8 to 3.0.9 breaks category class

2022-04-22 Thread Eric Milles (Jira)


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

Eric Milles updated GROOVY-10214:
-
Fix Version/s: 4.0.3

> Update from Groovy 3.0.8 to 3.0.9 breaks category class
> ---
>
> Key: GROOVY-10214
> URL: https://issues.apache.org/jira/browse/GROOVY-10214
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.9, 4.0.0
> Environment: java --version
> openjdk 16.0.2 2021-07-20
> OpenJDK Runtime Environment Temurin-16.0.2+7 (build 16.0.2+7)
> OpenJDK 64-Bit Server VM Temurin-16.0.2+7 (build 16.0.2+7, mixed mode, 
> sharing)
>Reporter: Alexander Veit
>Assignee: Eric Milles
>Priority: Major
> Fix For: 5.0.0-alpha-1, 4.0.3
>
>
> We have a category class as part of our product's Groovy API that breaks 
> after the update from Groovy 3.0.8 (indy) to 3.0.9 (indy).
> Scripts that call the category class with Integer of Long arguments throw an 
> exception. E.g.
> {code:java}
> use (org.example.Convert)
> {
>   assert '1234' == 1234.canonicalLexicalRepresentation
> }
> {code}
> throws
> {noformat}
> java.lang.IllegalArgumentException: argument type mismatch
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:567)
>   at 
> org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:54)
>   at 
> org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod.invoke(NewInstanceMetaMethod.java:54)
>   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
>   at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1956)
>   at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3843)
>   at 
> org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:199)
>   at 
> org.codehaus.groovy.runtime.callsite.PojoMetaClassGetPropertySite.getProperty(PojoMetaClassGetPropertySite.java:36)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
>   at 
> org.example.test.testInteger$_run_closure1.doCall(testInteger.groovy:5)
>   at org.example.test.testInteger$_run_closure1.doCall(testInteger.groovy)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:567)
>   at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
>   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
>   at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
>   at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
>   at groovy.lang.Closure.call(Closure.java:412)
>   at groovy.lang.Closure.call(Closure.java:406)
>   at 
> org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:123)
>   at 
> org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.access$300(GroovyCategorySupport.java:72)
>   at 
> org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:258)
>   at 
> org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:568)
>   at org.codehaus.groovy.runtime.dgm$880.invoke(Unknown Source)
>   at 
> org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:226)
>   at 
> org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:61)
>   at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:194)
>   at org.example.test.testInteger.run(testInteger.groovy:3)
>   at groovy.lang.GroovyShell.evaluate(GroovyShell.java:427)
>   at groovy.lang.GroovyShell.evaluate(GroovyShell.java:470)
> {noformat}
> The categoy class is implemented in Java and looks something like
> {code:java}
> public final class Convert
> {
>   private Convert()
>   {
>   }
>   public 

[jira] [Updated] (GROOVY-10214) Update from Groovy 3.0.8 to 3.0.9 breaks category class

2022-02-03 Thread Alexander Veit (Jira)


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

Alexander Veit updated GROOVY-10214:

Affects Version/s: 4.0.0

> Update from Groovy 3.0.8 to 3.0.9 breaks category class
> ---
>
> Key: GROOVY-10214
> URL: https://issues.apache.org/jira/browse/GROOVY-10214
> Project: Groovy
>  Issue Type: Bug
>Affects Versions: 3.0.9, 4.0.0
> Environment: java --version
> openjdk 16.0.2 2021-07-20
> OpenJDK Runtime Environment Temurin-16.0.2+7 (build 16.0.2+7)
> OpenJDK 64-Bit Server VM Temurin-16.0.2+7 (build 16.0.2+7, mixed mode, 
> sharing)
>Reporter: Alexander Veit
>Priority: Major
>
> We have a category class as part of our product's Groovy API that breaks 
> after the update from Groovy 3.0.8 (indy) to 3.0.9 (indy).
> Scripts that call the category class with Integer of Long arguments throw an 
> exception. E.g.
> {code:java}
> use (org.example.Convert)
> {
>   assert '1234' == 1234.canonicalLexicalRepresentation
> }
> {code}
> throws
> {noformat}
> java.lang.IllegalArgumentException: argument type mismatch
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:567)
>   at 
> org.codehaus.groovy.runtime.metaclass.ReflectionMetaMethod.invoke(ReflectionMetaMethod.java:54)
>   at 
> org.codehaus.groovy.runtime.metaclass.NewInstanceMetaMethod.invoke(NewInstanceMetaMethod.java:54)
>   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
>   at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:1956)
>   at groovy.lang.MetaClassImpl.getProperty(MetaClassImpl.java:3843)
>   at 
> org.codehaus.groovy.runtime.InvokerHelper.getProperty(InvokerHelper.java:199)
>   at 
> org.codehaus.groovy.runtime.callsite.PojoMetaClassGetPropertySite.getProperty(PojoMetaClassGetPropertySite.java:36)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callGetProperty(AbstractCallSite.java:329)
>   at 
> org.example.test.testInteger$_run_closure1.doCall(testInteger.groovy:5)
>   at org.example.test.testInteger$_run_closure1.doCall(testInteger.groovy)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>   at 
> java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:78)
>   at 
> java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>   at java.base/java.lang.reflect.Method.invoke(Method.java:567)
>   at 
> org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:107)
>   at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:323)
>   at 
> org.codehaus.groovy.runtime.metaclass.ClosureMetaClass.invokeMethod(ClosureMetaClass.java:274)
>   at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1035)
>   at groovy.lang.Closure.call(Closure.java:412)
>   at groovy.lang.Closure.call(Closure.java:406)
>   at 
> org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.use(GroovyCategorySupport.java:123)
>   at 
> org.codehaus.groovy.runtime.GroovyCategorySupport$ThreadCategoryInfo.access$300(GroovyCategorySupport.java:72)
>   at 
> org.codehaus.groovy.runtime.GroovyCategorySupport.use(GroovyCategorySupport.java:258)
>   at 
> org.codehaus.groovy.runtime.DefaultGroovyMethods.use(DefaultGroovyMethods.java:568)
>   at org.codehaus.groovy.runtime.dgm$880.invoke(Unknown Source)
>   at 
> org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite$PogoMetaMethodSiteNoUnwrapNoCoerce.invoke(PogoMetaMethodSite.java:226)
>   at 
> org.codehaus.groovy.runtime.callsite.PogoMetaMethodSite.callCurrent(PogoMetaMethodSite.java:61)
>   at 
> org.codehaus.groovy.runtime.callsite.CallSiteArray.defaultCallCurrent(CallSiteArray.java:51)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:171)
>   at 
> org.codehaus.groovy.runtime.callsite.AbstractCallSite.callCurrent(AbstractCallSite.java:194)
>   at org.example.test.testInteger.run(testInteger.groovy:3)
>   at groovy.lang.GroovyShell.evaluate(GroovyShell.java:427)
>   at groovy.lang.GroovyShell.evaluate(GroovyShell.java:470)
> {noformat}
> The categoy class is implemented in Java and looks something like
> {code:java}
> public final class Convert
> {
>   private Convert()
>   {
>   }
>   public static final String 
> getCanonicalLexicalRepresentation(CharSequence