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

Eric Milles resolved GROOVY-11076.
----------------------------------
    Resolution: Fixed

> @ClosureParams for StringGroovyMethods.replaceFirst and 
> StringGroovyMethods.replaceAll wrong
> --------------------------------------------------------------------------------------------
>
>                 Key: GROOVY-11076
>                 URL: https://issues.apache.org/jira/browse/GROOVY-11076
>             Project: Groovy
>          Issue Type: Bug
>    Affects Versions: 3.0.17
>            Reporter: Björn Kautler
>            Assignee: Eric Milles
>            Priority: Major
>
> The {{@ClosureParams}} for {{StringGroovyMethods.replaceFirst}} and 
> {{StringGroovyMethods.replaceAll}} seems to be wrong. It says 
> {{​&#123;"List<String>", "String[]"&#125;​}}, so without static compilation 
> IntelliJ shows a warning and with static compilation an error for the 
> {{String it}} parts of
> {code:groovy}
> def pascalCasedWorkflowName = workflowName
>     .replaceAll(/-\w/) { String it -> it[1].toUpperCase() }
>     .replaceFirst(/^\w/) { String it -> it[0].toUpperCase() }
> {code}
> while it compiles and works perfectly fine. I'd guess it should be 
> {{​&#123;"String", "List<String>", "String[]"&#125;​}}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to