Uploaded image for project: 'Groovy'
  1. Groovy
  2. GROOVY-11076

@ClosureParams for StringGroovyMethods.replaceFirst and StringGroovyMethods.replaceAll wrong

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.0.17
    • 3.0.18, 4.0.13
    • None
    • None

    Description

      The @ClosureParams for StringGroovyMethods.replaceFirst and StringGroovyMethods.replaceAll seems to be wrong. It says ​{"List<String>", "String[]"}​, so without static compilation IntelliJ shows a warning and with static compilation an error for the String it parts of

      def pascalCasedWorkflowName = workflowName
          .replaceAll(/-\w/) { String it -> it[1].toUpperCase() }
          .replaceFirst(/^\w/) { String it -> it[0].toUpperCase() }
      

      while it compiles and works perfectly fine. I'd guess it should be ​{"String", "List<String>", "String[]"}​

      Attachments

        Issue Links

          Activity

            People

              emilles Eric Milles
              vampire Björn Kautler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: