Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
Currently, the splitEachLine extension methods in different files have slightly different type hints:
NioGroovyMethods: @ClosureParams(value = FromString.class, options = "List<String>") StringGroovyMethods: @ClosureParams(value = FromString.class, options = "List<String>") IOGroovyMethods: @ClosureParams(value = FromString.class, options = "List<String>") ResourceGroovyMethods: @ClosureParams(value=SimpleType.class, options="java.lang.String[]")
The List<String> variant is the best match but the type checker is smart enough to handle some vararg cases too, so the following is actually better:
@ClosureParams(value=FromString.class,options={"List<String>","String[]"},conflictResolutionStrategy=PickFirstResolver.class)