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

Invalid closure name generated when containing method name has spaces

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 1.8-beta-3
    • 1.7.6, 1.8-beta-3
    • class generator
    • None

    Description

      import org.junit.Test
      
      class ClosureProblem {
         @Test
         void 'not working'() {
             def cl = { true }
             println cl.class
         }
      }
      

      The above code fails with

      Caught: java.lang.ClassFormatError: Illegal class name "ClosureProblem$_not working_closure1" in class file ClosureProblem$_not working_closure1
      

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            roshandawrani Roshan Dawrani
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: