[ 
https://issues.apache.org/jira/browse/GROOVY-7440?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14566515#comment-14566515
 ] 

ASF GitHub Bot commented on GROOVY-7440:
----------------------------------------

Github user asfgit closed the pull request at:

    https://github.com/apache/incubator-groovy/pull/27


> 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)

Reply via email to