groovy
  1. groovy
  2. GROOVY-4765

__$swapInit not quite doing what was expected

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8-rc-3
    • Fix Version/s: 1.8-rc-4
    • Component/s: bytecode
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The new method __$swapInit was added (I think) to support reloading, enabling someone to drive re-initialization of some state (like constants, callsite arrays). Unfortunately it doesn't quite do that - with regards to the callsite array all it does is call $getCallSiteArray. This doesn't clear it, this just ensures it is initialized - and if initialized in the past it will not be reinitialized. This means the reloader has to additionally null the callsite array before calling __$swapInit - which is a shame since it is all invoked by reflection.

        Activity

        Hide
        blackdrag blackdrag added a comment -

        the method now nulls out the field, which should do what you need

        Show
        blackdrag blackdrag added a comment - the method now nulls out the field, which should do what you need
        Hide
        Andy Clement added a comment -

        great, thanks!

        Show
        Andy Clement added a comment - great, thanks!

          People

          • Assignee:
            blackdrag blackdrag
            Reporter:
            Andy Clement
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: