[ https://issues.apache.org/jira/browse/GROOVY-7440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14565795#comment-14565795 ]
ASF GitHub Bot commented on GROOVY-7440: ---------------------------------------- GitHub user paulk-asert opened a pull request: https://github.com/apache/incubator-groovy/pull/27 GROOVY-7440: Improve ClosureParam type hints for various splitEachLin… …e GroovyMethod methods You can merge this pull request into a Git repository by running: $ git pull https://github.com/paulk-asert/incubator-groovy groovy7440 Alternatively you can review and apply these changes as the patch at: https://github.com/apache/incubator-groovy/pull/27.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #27 ---- commit 01d4a7afd33863dbd88bbe15e2ab01345a55b502 Author: Paul King <pa...@asert.com.au> Date: 2015-05-30T01:34:10Z GROOVY-7440: Improve ClosureParam type hints for various splitEachLine GroovyMethod methods ---- > Improve ClosureParam type hints for various splitEachLine GroovyMethod methods > ------------------------------------------------------------------------------ > > Key: GROOVY-7440 > URL: https://issues.apache.org/jira/browse/GROOVY-7440 > Project: Groovy > Issue Type: Bug > Reporter: Paul King > Assignee: Paul King > > Currently, the {{splitEachLine}} extension methods in different files have > slightly different type hints: > {code} > 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[]") > {code} > 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: > {code} > @ClosureParams(value=FromString.class,options={"List<String>","String[]"},conflictResolutionStrategy=PickFirstResolver.class) > {code} -- This message was sent by Atlassian JIRA (v6.3.4#6332)