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

ASF GitHub Bot commented on GROOVY-11858:
-----------------------------------------

eric-milles opened a new pull request, #2379:
URL: https://github.com/apache/groovy/pull/2379

   Wait to execute an `Object` extension method until no method has been found 
on delegate or owner.




> Splitting string inside tap closure throws NullPointerException
> ---------------------------------------------------------------
>
>                 Key: GROOVY-11858
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11858
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 5.0.4
>            Reporter: Evan Shaw
>            Assignee: Eric Milles
>            Priority: Major
>
> This code throws an exception:
> {code:groovy}
> 'a b c'.tap { println(split()) }
> {code}
> The exception message:
> {code}
> NullPointerException: Cannot invoke 
> "groovy.lang.Closure.getMaximumNumberOfParameters()" because "wrapped" is null
> {code}
> If I pass an argument to split, it works as expected:
> {code:groovy}
> 'a b c'.tap { println(split(' ')) }
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to