-
Notifications
You must be signed in to change notification settings - Fork 466
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Passing GString to groovy-mocked method taking String argument yields IllegalArgumentException #1216
Comments
I just ran the same test with the current master and can confirm that it works for me now. Thanks for the swift bugfix! 😀 |
Any chance of this being backported to a 1.3-bugfix? With Jenkins I am stuck with Groovy 2.4 for now... |
@pauxus, I am not a maintainer here, but I remember Leonard's statement that due to resource limitations (development time), currently there is no plan to ever port back any functionality or even bugfixes to older versions. All fixes and features can only be expected in newer releases, the 1.x "branch" will not be maintained after 2.0 is out and in fact has not been maintained since the 1.3 release, which is also when 2.0 development began. So at present, the Spock development "tree" is strictly linear. I think Leonard also said that if someone would volunteer to actively maintain a 1.3 bugfix/backport branch, the team might reconsider. But as usual in OSS projects, things are only happening if someone steps up to actually do it. |
Issue description
When creating a
GroovyMock
for a class with a methodsomeMethod(String arg)
and then passing a GString to it during a test, e.g.someMethod("foo ${1 + 1}")
, it will yieldjava.lang.IllegalArgumentException: argument type mismatch
.For me this looks like a bug.
How to reproduce
The (unfiltered) stack trace looks like this:
Link to a gist or similar (optional)
Origin: https://stackoverflow.com/q/63797837/1082681
Spock versions
Happens both in
1.3-groovy-2.5
and2.0-M3-groovy-3.0
The text was updated successfully, but these errors were encountered: