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

wasted work in "ClassNode.addMixin"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0.5
    • Fix Version/s: 2.0.6, 2.1.0-beta-1, 1.8.9
    • Component/s: None
    • Labels:
      None
    • Flags:
      Patch

      Description

      The problem appears in Groovy 2.0.5 and in revision 9c9cd23.. I
      attached a one-line patch (addMixin.diff) that fixes it.

      In method "ClassNode.addMixin", the loop over "mixins" should call
      "break" immediately after "skip" is set to "true". All the iterations
      after "skip" is set to "true" do not perform any useful work, at best
      they just set "skip" again to "true".

      "ClassNode.addInterface" has a similar problem. I attached a second
      patch for it (addInterface.diff).

        Attachments

          Activity

            People

            • Assignee:
              paulk Paul King
              Reporter:
              adriannistor Adrian Nistor
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: