Groovy
  1. Groovy
  2. GROOVY-4765

__$swapInit not quite doing what was expected

    Details

    • Type: Bug Bug
    • Status: 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

      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

        Andy Clement created issue -
        Hide
        Jochen Theodorou added a comment -

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

        Show
        Jochen Theodorou added a comment - the method now nulls out the field, which should do what you need
        Jochen Theodorou made changes -
        Field Original Value New Value
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.8-rc-4 [ 17245 ]
        Assignee Jochen Theodorou [ blackdrag ]
        Resolution Fixed [ 1 ]
        Hide
        Andy Clement added a comment -

        great, thanks!

        Show
        Andy Clement added a comment - great, thanks!
        Mark Thomas made changes -
        Project Import Sun Apr 05 13:32:57 UTC 2015 [ 1428240777691 ]
        Mark Thomas made changes -
        Workflow jira [ 12733693 ] Default workflow, editable Closed status [ 12745508 ]
        Mark Thomas made changes -
        Project Import Mon Apr 06 02:11:23 UTC 2015 [ 1428286283443 ]
        Mark Thomas made changes -
        Workflow jira [ 12971217 ] Default workflow, editable Closed status [ 12978985 ]
        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Closed Closed
        2d 3h 18m 1 Jochen Theodorou 07/Apr/11 16:11

          People

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

            Dates

            • Created:
              Updated:
              Resolved:

              Development