You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
I get this exception when trying to set an input field's value with the .value() method in a company project I'm working on. I tried to reproduce the issue in a public project to give a reproducible example but it works fine in the public project, which is inconvenient.
| groovy.lang.MissingMethodException: No signature of method: java.util.HashMap$Values.minus() is applicable for argument types: (java.util.ArrayList) values: [[input, select, textarea]]
Possible solutions: min(), min(groovy.lang.Closure), min(java.util.Comparator), find(), find(), unique()
In the past I've been bitten by HashMap.values() not being a normal collection type (List, Set, etc.) - it's a special class Values inside HashMap that doesn't have all the same collection methods as some of the more common collection classes.
From looking at what methods the Values class does have, it looks like it has the removeAll() method which could be a good substitute in this case.
The text was updated successfully, but these errors were encountered:
I think I know why I'm getting this exception in my Grails2 apps but can't recreate in Geb core - different Groovy versions.
I added a test to the geb-grails plugin that calls .value() and messed around with specifying different Groovy versions in geb-grails.gradle. Currently project.groovyVersion is in there, which is 2.4.5. When I changed the Groovy version to what ships with Grails 2.4.2 (Groovy 2.3.7), then I got the exception. I tried some different versions and any Groovy version >= 2.4.0 works fine so they must have added more methods for that HashMap.Values class in Groovy 2.4.0
Now that I have a way to reproduce and test the fix I will work on a PR to fix it to work with Groovy < 2.4