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
Regression in Groovy: ClassCastException for closures not returning Boolean #71
Comments
Thanks for pointing this out, I didn't know this. Is there a way to work-around this in the code to make it work again that you're aware of? |
I tried writing my own extension module, but I gave up, as a special entry in the JAR manifest is needed. |
Ok, so the |
It is probably enough, but I would need to create a JAR with my new extensions and add a dependency on it to tests. In my case it was faster to change the code. |
I've published a new snapshot that I would be glad if you could try out to see if it works: You'll need the following maven repo: <repositories>
<repository>
<id>sonatype</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
<snapshots />
</repository>
</repositories> |
This does not work, but I have a fix in my fork, I'll submit a merge request soon. |
Related to #65. Btw, @pkubowicz it is not required to build and add as a dependency a JAR to create a new extension. Putting a proper file in |
I submitted my changes in #72 |
Thanks! Can I close this issue? (perhaps you could add the wiki updates as a new issue) |
I've also published a new snapshot |
… AwaitilitySupport AwaitilityGroovyBridge needs to be removed because depending on random factors (class loading?) it can overwrite code added by AwaitilityExtensionModule and cause non-bool closures to fail - this is reproduced by tests added in this commit. AwaitilityTrait and AwaitilitySupport can be made empty as AwaitilityExtensionModule does their work now. They are left only to prevent a breaking API change.
I found some problems if you had |
I don't see any problems with the current snapshot - I am closing this issue. |
Code:
1.7.0: passes
2.0.0: fails with
AwaitilityGroovyBridge used
runnable as Callable<Boolean>
while AwaitilityExtensionModule usesrunnable as Callable
.Implementing
AwaitilityTrait
does not help, it seems that the extension module takes precedence. You need to change the closure to{ "something" != null }
.Release Notes don't mention any breaking changes, so I consider this as a regression.
Also, please update examples from https://github.com/awaitility/awaitility/wiki/Groovy - they use deprecated classes.
The text was updated successfully, but these errors were encountered: