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

ExpandoMetaClassCreationHandle does infinite recursion for ExpandoMetaClass

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Trivial
    • Resolution: Fixed
    • 1.7.0
    • 1.7.2, 1.6.9, 1.8-beta-1
    • None
    • None
    • any
    • Patch

    Description

      in ExpandoMetaClassCreationHandle line 49 (else clause in createNormalMetaClass(Class,MetaClassRegistry)), there is a call

      super.create(theClass, registry)

      which should be replaced by a call

      super.createNormalMetaClass(theClass, registry)

      since, if createNormalMetaClass is invoked, this call came from super.create. Thus the call to super.create(..) creates infinite recursion.

      This occurs for example when executing code like this:

      MetaClassCreationHandle handle = new ExpandoMetaClassCreationHandle();
      println handle.create(ExpandoMetaClass, GroovySystem.getMetaClassRegistry());
      

      Attachments

        Activity

          People

            roshandawrani Roshan Dawrani
            misterd Joscha Drechsler
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: