[ 
https://issues.apache.org/jira/browse/GROOVY-9229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Paul King updated GROOVY-9229:
------------------------------
    Fix Version/s: 2.5.9

> Add @ClosureParams to closure input parameter of Sql.withInstance(...)
> ----------------------------------------------------------------------
>
>                 Key: GROOVY-9229
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9229
>             Project: Groovy
>          Issue Type: Improvement
>          Components: SQL processing
>    Affects Versions: 2.5.8
>            Reporter: Mauro Molinari
>            Assignee: Eric Milles
>            Priority: Minor
>             Fix For: 2.5.9, 3.0.0-rc-1
>
>          Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> The various overloadings of {{Sql.withInstance}} do not specify the input 
> parameter type of the closure, which is {{groovy.sql.Sql}}. Hence, if you 
> want even minimal help from the IDE you won't get anything, unless you 
> declare the input type in your closure declaration:
> Example:
> {code:groovy}
> Sql.withInstance(url, user, pass) { sql ->
>   sql.connec| <= invoke code assist here
> }
> {code}
> The IDE does not give any help and, if the surrounding code is type checked, 
> you'll even get a compilation error.
> Required workaround:
> {code:groovy}
> Sql.withInstance(url, user, pass) { Sql sql ->
>   sql.connec| <= invoke code assist here
> }
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to