You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Eric Milles (Jira)" <ji...@apache.org> on 2025/06/01 19:49:00 UTC
[jira] [Resolved] (GROOVY-11676) Method reference using class name results in bogus error message
[ https://issues.apache.org/jira/browse/GROOVY-11676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eric Milles resolved GROOVY-11676.
----------------------------------
Fix Version/s: 4.0.28
5.0.0-beta-2
Resolution: Fixed
> Method reference using class name results in bogus error message
> ----------------------------------------------------------------
>
> Key: GROOVY-11676
> URL: https://issues.apache.org/jira/browse/GROOVY-11676
> Project: Groovy
> Issue Type: Bug
> Affects Versions: 4.0.26
> Reporter: Christopher Smith
> Assignee: Eric Milles
> Priority: Minor
> Fix For: 4.0.28, 5.0.0-beta-2
>
>
> I am writing a processing pipeline using {{with}} as a map-step. Since {{with}} still does not accept {{{}Function{}}}, I am using method references. I had a functional pipeline like this:
> {code:groovy}
> gremlin.V() /* stuff */
> .with(Queries.&whoamiTraversal)
> .with(Queries.&processTraversal)
> {code}
> This worked correctly when the methods were static. However, I changed {{processTraversal}} to be a non-static method, and I should have changed the invocation to {{this.&processTraversal}}. Instead, the STC did not complain, and I received a runtime error
> {code}
> groovy.lang.MissingMethodException: No signature of method: org.codehaus.groovy.runtime.MethodClosure.processTraversal() is applicable for argument types: ...
> {code}
> Instead of pointing at {{MethodClosure}}, the error message should indicate where the actual problem is.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)