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

bug in GroovyCategorySupport - infinite loop

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Blocker
    • Resolution: Fixed
    • Affects Version/s: 1.6-beta-1
    • Fix Version/s: 1.5.7, 1.6-beta-2
    • Component/s: None
    • Labels:
      None
    • Flags:
      Patch

      Description

      GroovyCategorySupport has bug in methods prioritization logic, that can lead to infinite loop.

      Please try this snippet in groovy 1.6-beta-2:
      groovy -e "org.codehaus.groovy.runtime.GroovyCategorySupport.use(groovy.servlet.ServletCategory,

      {println 'Hello'}

      )"

      I just tried it in specified version of Groovy, downloaded from http://build.canoo.com/groovy/artifacts/20080603122913/dist/groovy-binary-1.6-beta-2-SNAPSHOT.zip

      Groovy hangs up.

      The solution is quite simple (see patch).

        Attachments

        1. GroovyCategorySupport.java.patch
          0.2 kB
          Sergey Bondarenko

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              enterit Sergey Bondarenko
            • Votes:
              1 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: