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

final variable declaration is broken

Agile BoardAttach filesAttach ScreenshotVotersWatch issueWatchersCreate sub-taskLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Cannot Reproduce
    • 2.5.0-beta-1
    • None
    • Compiler
    • None
    • Debian Sid, Groovy master head

    Description

      .../Gant/src/main/groovy/gant/Gant.groovy: 128: The variable [fileText] is declared final but is reassigned
      . At [128:7] @ line 128, column 7.
      final fileText = url.text
      ^

      1 error

      This is a brand new error the code used to compile just fine. For the avoidance of doubt:

      $ grep fileText `find src -name "*.groovy"`
      src/main/groovy/gant/Gant.groovy: final fileText = url.text
      src/main/groovy/gant/Gant.groovy: compileScript(cacheDirectory, fileText, className)
      src/main/groovy/gant/Gant.groovy: return binding.groovyShell.parse(fileText, buildClassName)

      the variable is not in fact reassigned.

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            paulk Paul King
            russel Dr. Russel Winder
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment