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

Groovy fails when a script starts with a #

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4.17
    • Fix Version/s: 4.0.0-alpha-1, 3.0.3
    • Component/s: groovy-runtime
    • Labels:
      None

      Description

      An exception occurs in Groovy if the groovy file contains the character #.

      This happens on linux systems where a script that starts with a # will result in an error:

      Exception in thread "main" java.lang.ClassFormatError: Illegal class name "" in class file 

      simply doing this:

      groovy /path/#myfile

      will produce this error.

      This is a regression caused by GROOVY-6641

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              joseph.henry Joseph Henry
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: