groovy
  1. groovy
  2. GROOVY-4106

ExpandoMetaClassCreationHandle does infinite recursion for ExpandoMetaClass

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Trivial Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.7.0
    • Fix Version/s: 1.7.2, 1.6.9, 1.8-beta-1
    • Component/s: None
    • Labels:
      None
    • Environment:
      any
    • Testcase included:
      yes
    • Patch Submitted:
      Yes
    • Number of attachments :
      0

      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());
      

        Activity

        Hide
        Roshan Dawrani added a comment -

        Done

        Show
        Roshan Dawrani added a comment - Done

          People

          • Assignee:
            Roshan Dawrani
            Reporter:
            Joscha Drechsler
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: