Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
The following groovy snippet results in an exception because the GString is not automatically converted into a String:
stringList = ["US-ASCII", "UTF-8", "UTF-16"].each {
"test".getBytes("${it}")
}
I had a difficult time getting this down to a simple test case. It appears that this is only a problem when you're using an overloaded method (like getBytes()). This same test will work fine with concat().