[jira] [Comment Edited] (GROOVY-7996) Using with method with a closure that references a protected property produces ClassCastException
[ https://issues.apache.org/jira/browse/GROOVY-7996?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16748379#comment-16748379 ] Paul King edited comment on GROOVY-7996 at 1/22/19 4:46 AM: Proposed PR merged. Workaround is to use `owner.bar.isEmpty()` or `this.bar.isEmpty()` was (Author: paulk): Proposed PR merged. > Using with method with a closure that references a protected property > produces ClassCastException > - > > Key: GROOVY-7996 > URL: https://issues.apache.org/jira/browse/GROOVY-7996 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 >Reporter: Graeme Rocher >Assignee: Paul King >Priority: Major > Fix For: 2.5.6, 3.0.0-alpha-5 > > Time Spent: 20m > Remaining Estimate: 0h > > The following example: > {code} > class Foo { > Object propertyMissing(String name) { > return "stuff" > } > > void build(Closure callable) { > this.with(callable) > } > } > @groovy.transform.CompileStatic > class Bar { > protected List bar = [] > > boolean doStuff() { > Foo foo = new Foo() > foo.build { >return bar.isEmpty() > } > } > } > new Bar().doStuff() > {code} > Produces > {code} > java.lang.ClassCastException: java.lang.String cannot be cast to > java.util.List > at Bar$_doStuff_closure1.doCall(ConsoleScript3:19) > at Bar$_doStuff_closure1.call(ConsoleScript3) > at > org.codehaus.groovy.runtime.DefaultGroovyMethods.with(DefaultGroovyMethods.java:242) > at Bar.doStuff(ConsoleScript3:18) > at Ba > {code} > The equivalent code without CompileStatic prints: > {code} > Result: false > {code} > The behaviour of both should be he same IMO -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (GROOVY-7687) Bug with @CompileStatic and nested closures
[ https://issues.apache.org/jira/browse/GROOVY-7687?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King resolved GROOVY-7687. --- Resolution: Fixed Assignee: Paul King Fix Version/s: 3.0.0-alpha-5 2.5.6 I believe this was fixed as part of GROOVY-7996. > Bug with @CompileStatic and nested closures > --- > > Key: GROOVY-7687 > URL: https://issues.apache.org/jira/browse/GROOVY-7687 > Project: Groovy > Issue Type: Bug > Components: Compiler >Affects Versions: 2.4.5 >Reporter: Marc Ewert >Assignee: Paul King >Priority: Major > Fix For: 2.5.6, 3.0.0-alpha-5 > > > I've encountered a strange bug in conjunction with closures, delegates and > @CompileStatic. The following code works as expected: > {code} > import groovy.transform.CompileStatic > @CompileStatic > class SimpleTest { > static class Foo { > List bars = Arrays.asList(new Bar()) > } > static class Bar { > String message > public String toString() {return message} > } > void execute(Foo foo) { > interactions(foo, { > bars.each ( { bar -> bar.message = "hello world"}) > }) > } > void interactions(Foo foo, @DelegatesTo(Foo) Closure closure) { > closure.delegate = foo > closure.resolveStrategy = Closure.DELEGATE_FIRST > closure() > } > static void main(String... args) { > SimpleTest test = new SimpleTest() > Foo foo = new Foo() > test.execute(foo) > println foo.bars > } > } > {code} > But when the bars member is prefixed with a public modifier the following > compilation error is thrown > {code} > Exception in thread "main" java.lang.ClassCastException: > SimpleTest$_execute_closure1 cannot be cast to SimpleTest$Foo > at SimpleTest$_execute_closure1.doCall(SimpleTest.groovy:18) > at SimpleTest$_execute_closure1.call(SimpleTest.groovy) > at SimpleTest.interactions(SimpleTest.groovy:25) > at SimpleTest.execute(SimpleTest.groovy:17) > at SimpleTest.main(SimpleTest.groovy:31) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at > sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:497) > at com.intellij.rt.execution.application.AppMain.main(AppMain.java:144) > {code} > Here the code causing the error: > {code} > import groovy.transform.CompileStatic > @CompileStatic > class SimpleTest { > static class Foo { > public List bars = Arrays.asList(new Bar()) > } > static class Bar { > String message > public String toString() {return message} > } > void execute(Foo foo) { > interactions(foo, { > bars.each ( { bar -> bar.message = "hello world"}) > }) > } > void interactions(Foo foo, @DelegatesTo(Foo) Closure closure) { > closure.delegate = foo > closure.resolveStrategy = Closure.DELEGATE_FIRST > closure() > } > static void main(String... args) { > SimpleTest test = new SimpleTest() > Foo foo = new Foo() > test.execute(foo) > println foo.bars > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Resolved] (GROOVY-7996) Using with method with a closure that references a protected property produces ClassCastException
[ https://issues.apache.org/jira/browse/GROOVY-7996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King resolved GROOVY-7996. --- Resolution: Fixed Assignee: Paul King Fix Version/s: 3.0.0-alpha-5 2.5.6 Proposed PR merged. > Using with method with a closure that references a protected property > produces ClassCastException > - > > Key: GROOVY-7996 > URL: https://issues.apache.org/jira/browse/GROOVY-7996 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.4.7 >Reporter: Graeme Rocher >Assignee: Paul King >Priority: Major > Fix For: 2.5.6, 3.0.0-alpha-5 > > Time Spent: 20m > Remaining Estimate: 0h > > The following example: > {code} > class Foo { > Object propertyMissing(String name) { > return "stuff" > } > > void build(Closure callable) { > this.with(callable) > } > } > @groovy.transform.CompileStatic > class Bar { > protected List bar = [] > > boolean doStuff() { > Foo foo = new Foo() > foo.build { >return bar.isEmpty() > } > } > } > new Bar().doStuff() > {code} > Produces > {code} > java.lang.ClassCastException: java.lang.String cannot be cast to > java.util.List > at Bar$_doStuff_closure1.doCall(ConsoleScript3:19) > at Bar$_doStuff_closure1.call(ConsoleScript3) > at > org.codehaus.groovy.runtime.DefaultGroovyMethods.with(DefaultGroovyMethods.java:242) > at Bar.doStuff(ConsoleScript3:18) > at Ba > {code} > The equivalent code without CompileStatic prints: > {code} > Result: false > {code} > The behaviour of both should be he same IMO -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] asfgit merged pull request #857: GROOVY-7996: Using with method with a closure that references a prote…
asfgit merged pull request #857: GROOVY-7996: Using with method with a closure that references a prote… URL: https://github.com/apache/groovy/pull/857 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[jira] [Commented] (GROOVY-4287) CLONE - import of static nested classes in external groovy files is broken
[ https://issues.apache.org/jira/browse/GROOVY-4287?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16748095#comment-16748095 ] Daniel Sun commented on GROOVY-4287: The proposed PR is ready to review: https://github.com/apache/groovy/pull/858 P.S. merged in 72 hours if no one rejects. > CLONE - import of static nested classes in external groovy files is broken > -- > > Key: GROOVY-4287 > URL: https://issues.apache.org/jira/browse/GROOVY-4287 > Project: Groovy > Issue Type: Sub-task > Components: Compiler >Affects Versions: 1.7.3 >Reporter: Paul King >Assignee: Daniel Sun >Priority: Major > Fix For: 2.5.6, 3.0.0-alpha-5 > > Time Spent: 10m > Remaining Estimate: 0h > > Splitting off problematic but critical case of resolving static nested and > inner classes in external groovy files from GROOVY-4267. Copying Roshan's > example from that issue: > {code:title=Test.groovy} > import static Outer.* > // import static Outer.Inner // also fails > // import Outer.Inner// also fails > assert Inner.class.name != null > {code} > {code:title=Outer.groovy} > class Outer { > static class Inner {} > } > {code} > Output: > {noformat} > Caught: groovy.lang.MissingPropertyException: No such property: Inner for > class: Test > at Test.run(Test.groovy:4) > {noformat} > Error message is slightly different for non-static import: > {noformat} > org.codehaus.groovy.control.MultipleCompilationErrorsException: startup > failed: > Test.groovy: 2: unable to resolve class Outer.Inner > @ line 2, column 1. >import Outer.Inner >^ > 1 error > {noformat} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] danielsun1106 opened a new pull request #858: GROOVY-4287: CLONE - import of static nested classes in external groo…
danielsun1106 opened a new pull request #858: GROOVY-4287: CLONE - import of static nested classes in external groo… URL: https://github.com/apache/groovy/pull/858 …vy files is broken This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[jira] [Resolved] (GROOVY-8962) Provide an option to generate Java stubs in memory for better compilation performance
[ https://issues.apache.org/jira/browse/GROOVY-8962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun resolved GROOVY-8962. Resolution: Fixed Fixed by https://github.com/apache/groovy/commit/6616c353b264e2c00d729d14983bcca53e6db950 > Provide an option to generate Java stubs in memory for better compilation > performance > - > > Key: GROOVY-8962 > URL: https://issues.apache.org/jira/browse/GROOVY-8962 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 3.0.0-alpha-5 > > Time Spent: 0.5h > Remaining Estimate: 0h > > The option to enable generating Java stubs in memory is {{memStub}}, which is > one of {{jointCompilationOptions}}: > {code:java} > def config = new CompilerConfiguration() > config.jointCompilationOptions = [memStub: true] > {code} > See the discussion in the dev mailing list: > http://groovy.329449.n5.nabble.com/PROPOSAL-Provide-an-option-to-generate-stubs-in-in-momery-file-system-for-better-compiling-performane-tt5756151.html > P.S. A better implementation is found, so no 3rd-party lib is required. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8962) Provide an option to generate Java stubs in memory for better compilation performance
[ https://issues.apache.org/jira/browse/GROOVY-8962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-8962: --- Description: The option to enable generating Java stubs in memory is {{memStub}}, which is one of {{jointCompilationOptions}}: {code:java} def config = new CompilerConfiguration() config.jointCompilationOptions = [memStub: true] {code} See the discussion in the dev mailing list: http://groovy.329449.n5.nabble.com/PROPOSAL-Provide-an-option-to-generate-stubs-in-in-momery-file-system-for-better-compiling-performane-tt5756151.html P.S. A better implementation is found, so no 3rd-party lib is required. was: The option to enable generating Java stubs in memory is {{memStub}}, which is one of {{jointCompilationOptions}}: {code:java} def config = new CompilerConfiguration() config.with { targetDirectory = createTempDir() jointCompilationOptions = [memStub: true] } {code} See the discussion in the dev mailing list: http://groovy.329449.n5.nabble.com/PROPOSAL-Provide-an-option-to-generate-stubs-in-in-momery-file-system-for-better-compiling-performane-tt5756151.html P.S. A better implementation is found, so no 3rd-party lib is required. > Provide an option to generate Java stubs in memory for better compilation > performance > - > > Key: GROOVY-8962 > URL: https://issues.apache.org/jira/browse/GROOVY-8962 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 3.0.0-alpha-5 > > Time Spent: 0.5h > Remaining Estimate: 0h > > The option to enable generating Java stubs in memory is {{memStub}}, which is > one of {{jointCompilationOptions}}: > {code:java} > def config = new CompilerConfiguration() > config.jointCompilationOptions = [memStub: true] > {code} > See the discussion in the dev mailing list: > http://groovy.329449.n5.nabble.com/PROPOSAL-Provide-an-option-to-generate-stubs-in-in-momery-file-system-for-better-compiling-performane-tt5756151.html > P.S. A better implementation is found, so no 3rd-party lib is required. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Updated] (GROOVY-8962) Provide an option to generate Java stubs in memory for better compilation performance
[ https://issues.apache.org/jira/browse/GROOVY-8962?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Daniel Sun updated GROOVY-8962: --- Description: The option to enable generating Java stubs in memory is {{memStub}}, which is one of {{jointCompilationOptions}}: {code:java} def config = new CompilerConfiguration() config.with { targetDirectory = createTempDir() jointCompilationOptions = [memStub: true] } {code} See the discussion in the dev mailing list: http://groovy.329449.n5.nabble.com/PROPOSAL-Provide-an-option-to-generate-stubs-in-in-momery-file-system-for-better-compiling-performane-tt5756151.html P.S. A better implementation is found, so no 3rd-party lib is required. was: See http://groovy.329449.n5.nabble.com/PROPOSAL-Provide-an-option-to-generate-stubs-in-in-momery-file-system-for-better-compiling-performane-tt5756151.html A better implementation is found, no 3rd-party lib is required. > Provide an option to generate Java stubs in memory for better compilation > performance > - > > Key: GROOVY-8962 > URL: https://issues.apache.org/jira/browse/GROOVY-8962 > Project: Groovy > Issue Type: Improvement >Reporter: Daniel Sun >Assignee: Daniel Sun >Priority: Major > Fix For: 3.0.0-alpha-5 > > Time Spent: 0.5h > Remaining Estimate: 0h > > The option to enable generating Java stubs in memory is {{memStub}}, which is > one of {{jointCompilationOptions}}: > {code:java} > def config = new CompilerConfiguration() > config.with { > targetDirectory = createTempDir() > jointCompilationOptions = [memStub: true] > } > {code} > See the discussion in the dev mailing list: > http://groovy.329449.n5.nabble.com/PROPOSAL-Provide-an-option-to-generate-stubs-in-in-momery-file-system-for-better-compiling-performane-tt5756151.html > P.S. A better implementation is found, so no 3rd-party lib is required. -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] asfgit closed pull request #855: GROOVY-8962: Provide an option to generate Java stubs in memory for b…
asfgit closed pull request #855: GROOVY-8962: Provide an option to generate Java stubs in memory for b… URL: https://github.com/apache/groovy/pull/855 This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services
[jira] [Closed] (GROOVY-7469) ClassCastException in groovy 2.3.10. See description section for more information
[ https://issues.apache.org/jira/browse/GROOVY-7469?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Paul King closed GROOVY-7469. - Resolution: Cannot Reproduce I'll mark this as closed since we don't have a reproducible example. Please reopen if you have some specific code we can look at. > ClassCastException in groovy 2.3.10. See description section for more > information > - > > Key: GROOVY-7469 > URL: https://issues.apache.org/jira/browse/GROOVY-7469 > Project: Groovy > Issue Type: Bug >Affects Versions: 2.3.10 >Reporter: Vijaykumar >Priority: Major > Labels: usertask > > Hi Team, > I'm facing an issue with groovy version 2.3.10. I'm doing the version upgrade > from 2.2.2 to 2.3.10. > The existing code is working in groovy 2.2.2 and the same code throws an > exception (ClassCastException) in groovy 2.3.10. > //FoodItem Class -- start > Class FoodItem extends Item > { > static Construct builder() { > new Construct() > } > static class Construct > { > Item.Construct build > Construct() { > build = new Item.Construct() { } >} >FoodItem build() { > new FoodItem (build.map) // This line throws the classcastexception > } > } > //FoodItem Class -- End > // Item class -- start > abstract class Item > { > protected TreeMap map > protected Item() { > this.map = [:] > } > protected Item(TreeMap map) { > this.map = [:] > if (map != null) { > this.map = map > } > } > protected Item(Map map) { > this.map = [:] > if (map != null) { > this.map = new TreeMap(map) > } > } > TreeMap getMap() { this.map } > abstract protected static class Construct { > protected TreeMap map > protected Construct() { > this.map = [:] > } > protected Construct(Item item) { > this.map = item.map as TreeMap > } > } > // Item class -- End -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (GROOVY-8645) ClassCastException after checking of instanceOf
[ https://issues.apache.org/jira/browse/GROOVY-8645?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16747904#comment-16747904 ] Paul King commented on GROOVY-8645: --- Do you have a self-contained example illustrating the problem? We have fixed a number of related issues (some further ones are still underway). I am unsure whether your case has been already fixed. > ClassCastException after checking of instanceOf > --- > > Key: GROOVY-8645 > URL: https://issues.apache.org/jira/browse/GROOVY-8645 > Project: Groovy > Issue Type: Bug > Components: groovy-runtime >Affects Versions: 2.4.11 >Reporter: Aram Arabyan >Priority: Minor > > Have grails (version 3.2.11) application (it includes groovy-2.4.11.jar). > And following code > {code:groovy} > @CompileStatic > def removeAllErrors(DomainClass domainInstance) { > newAssociationOperationRunnerBuilder(domainInstance) > .setSkipChain({DomainObjectDetails > domainObjectDetails -> > skipValidation(domainObjectDetails.currentDomain.domainObject, > domainObjectDetails.associationProp?.name)}) > .build().run({DomainObjectDetails > domainObjectDetails -> > DomainClass domain = > domainObjectDetails.currentDomain.domainObject > if (domain instanceof GormValidateable) { > ((GormValidateable)domain).clearErrors() > } > if(domain instanceof WarningsHolder) { > WarningsHolder warningsHolder = domain as WarningsHolder > //<--line 120 > Warnings warnings = warningsHolder.getWarnings() > warnings.clearWarnings(false, true) > } > }) > } > {code} > And I am getting following exception > {code} > java.lang.IllegalArgumentException: java.lang.ClassCastException@58798bfb > at sun.reflect.GeneratedMethodAccessor5958.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1213) > at groovy.lang.ExpandoMetaClass.invokeMethod(ExpandoMetaClass.java:1125) > at groovy.lang.MetaClassImpl.invokeMethod(MetaClassImpl.java:1022) > at > org.codehaus.groovy.runtime.InvokerHelper.invokePogoMethod(InvokerHelper.java:925) > at > org.codehaus.groovy.runtime.InvokerHelper.invokeMethod(InvokerHelper.java:908) > at > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodN(ScriptBytecodeAdapter.java:168) > at > org.codehaus.groovy.runtime.ScriptBytecodeAdapter.asType(ScriptBytecodeAdapter.java:591) > at > com.webbfontaine.grails.plugins.validation.rules.DocVerificationService$_removeAllErrors_closure5.doCall(DocVerificationService.groovy:120) > at sun.reflect.GeneratedMethodAccessor2559.invoke(Unknown Source) > at > sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) > at java.lang.reflect.Method.invoke(Method.java:498) > at > org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93) > at groovy.lang.MetaMethod.doMethodInvoke(MetaMethod.java:325){code} > Any idea what can be the reason ? Pay attention that I have @CompileStatic > there also. > = > Previous version of this code was without @CompileStatic > {code:groovy} > def removeAllErrors(def domainInstance) { > newAssociationOperationRunnerBuilder(domainInstance) > .setSkipChain({DomainObjectDetails > domainObjectDetails -> > skipValidation(domainObjectDetails.currentDomain.domainObject, > domainObjectDetails.associationProp?.name)}) > .build().run({DomainObjectDetails > domainObjectDetails -> > domainObjectDetails.currentDomain.domainObject.clearErrors() > if(domainObjectDetails.currentDomain.domainObject instanceof > WarningsHolder) { > Warnings warnings = > domainObjectDetails.currentDomain.domainObject.getWarnings() > warnings.clearWarnings(false, true) > } > }) > } > {code} > And I was getting this exception > {code} > com.webbfontaine.sw.sad.ci.Item cannot be cast to > com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3. Stacktrace follows: > java.lang.ClassCastException: com.webbfontaine.sw.sad.ci.Item cannot be cast > to com.webbfontaine.sw.sad.ci.Item_$$_jvst840_3 at >
[jira] [Commented] (GROOVY-8792) groovy-json not working from Ant task
[ https://issues.apache.org/jira/browse/GROOVY-8792?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16747778#comment-16747778 ] Ludger Wolter commented on GROOVY-8792: --- Yes my scenario doesn't involve Ant. The error occurs in both environments JDK 11 and JDK 8 {code} Operating system name: Linux 4.15.0-43-generic (amd64) OS patch:unknown CPU: Java Runtime Environment vendor: AdoptOpenJDK Java Runtime Environment version:11.0.1 Java Virtual Machine name: OpenJDK 64-Bit Server VM Java Virtual Machine version:11.0.1+13 Java Virtual Machine info: mixed mode{code} {code} Operating system name: Linux 4.15.0-43-generic (amd64) OS patch:unknown CPU: Java Runtime Environment vendor: Oracle Corporation Java Runtime Environment version:1.8.0_201 Java Virtual Machine name: Java HotSpot(TM) 64-Bit Server VM Java Virtual Machine version:25.201-b09 Java Virtual Machine info: mixed mode {code} > groovy-json not working from Ant task > -- > > Key: GROOVY-8792 > URL: https://issues.apache.org/jira/browse/GROOVY-8792 > Project: Groovy > Issue Type: Bug > Components: Ant integration, JSON >Affects Versions: 2.5.0 >Reporter: Gregory Moltchadski >Priority: Major > Labels: ant, json > Attachments: testsuite.7z > > > groovy-json 2.5.X uses java.util.ServiceLoader to load FastStringService and > therefore doesn't work in a multi-classloader environment > build.xml > {code:xml} > > classname="org.codehaus.groovy.ant.Groovy" > > classpath="groovy-2.5.2.jar:groovy-ant-2.5.2.jar:groovy-json-2.5.2.jar"/> > > > > > > > > {code} > Build output: > {code:xml} > BUILD FAILED > C:\test2\build.xml:8: java.lang.RuntimeException: Unable to load > FastStringService > at > org.apache.groovy.json.internal.FastStringUtils.getService(FastStringUtils.java:57) > at > org.apache.groovy.json.internal.FastStringUtils.toCharArray(FastStringUtils.java:67) > at > org.apache.groovy.json.internal.BaseJsonParser.parse(BaseJsonParser.java:112) > at groovy.json.JsonSlurper.parseText(JsonSlurper.java:205) > at groovy.json.JsonSlurper$parseText.call(Unknown Source) > 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 > embedded_script_in_C__test2_build_dot_xml.run(embedded_script_in_C__test2_build_dot_xml:2) > at org.codehaus.groovy.ant.Groovy.parseAndRunScript(Groovy.java:517) > at org.codehaus.groovy.ant.Groovy.execGroovy(Groovy.java:464) > at org.codehaus.groovy.ant.Groovy.execute(Groovy.java:322) > at > org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:292) > at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) > at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) > at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) > at java.lang.reflect.Method.invoke(Unknown Source) > at > org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:106) > at org.apache.tools.ant.Task.perform(Task.java:348) > at org.apache.tools.ant.Target.execute(Target.java:435) > at org.apache.tools.ant.Target.performTasks(Target.java:456) > at > org.apache.tools.ant.Project.executeSortedTargets(Project.java:1393) > at org.apache.tools.ant.Project.executeTarget(Project.java:1364) > at > org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41) > at org.apache.tools.ant.Project.executeTargets(Project.java:1248) > at org.apache.tools.ant.Main.runBuild(Main.java:851) > at org.apache.tools.ant.Main.startAnt(Main.java:235) > at org.apache.tools.ant.launch.Launcher.run(Launcher.java:280) > at org.apache.tools.ant.launch.Launcher.main(Launcher.java:109) > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Created] (GROOVY-8964) MissingMethodException when trying to resolve overload with variable arguments
Alexey Subach created GROOVY-8964: - Summary: MissingMethodException when trying to resolve overload with variable arguments Key: GROOVY-8964 URL: https://issues.apache.org/jira/browse/GROOVY-8964 Project: Groovy Issue Type: Bug Affects Versions: 2.5.5 Environment: Windows Reporter: Alexey Subach Minimal script to reproduce the issue: {code} #!/usr/bin/env groovy class Example { void method(String... args) { } static void method(List args, File workDirectory, Appendable out, Appendable err) { } void execute() { method("a", "b", "c", "d") } } Example ex = new Example() ex.execute() {code} Running this script on Windows produces the following exception: {code} Caught: groovy.lang.MissingMethodException: No signature of method: static Example.method() is applicable for argument types: (String, String, String, String) values: [a, b, c, d] Possible solutions: method([Ljava.lang.String;), method(java.util.List, java.io.File, java.lang.Appendable, java.lang.Appendable) groovy.lang.MissingMethodException: No signature of method: static Example.method() is applicable for argument types: (String, String, String, String) values: [a, b, c, d] Possible solutions: method([Ljava.lang.String;), method(java.util.List, java.io.File, java.lang.Appendable, java.lang.Appendable) at Example.execute(Hello.groovy:12) at Example$execute.call(Unknown Source) at Hello.run(Hello.groovy:17) {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[GitHub] danielsun1106 commented on issue #855: GROOVY-8962: Provide an option to generate Java stubs in memory for b…
danielsun1106 commented on issue #855: GROOVY-8962: Provide an option to generate Java stubs in memory for b… URL: https://github.com/apache/groovy/pull/855#issuecomment-455981690 72 hours have gone. As no one rejects the PR, I'll merge it tonight. This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services