Evan Shaw created GROOVY-11858:
----------------------------------
Summary: 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
This code throws an exception:
```
'a b c'.tap\{println(split())}
```
The exception message:
```
NullPointerException: Cannot invoke
"groovy.lang.Closure.getMaximumNumberOfParameters()" because "wrapped" is null
```
If I pass an argument to split, it works as expected:
```
'a b c'.tap\{println(split(' '))}
```
--
This message was sent by Atlassian Jira
(v8.20.10#820010)