)]}'
{
  "commit": "5e56ebcb3096e9bf18b65996b700a6e0bb264020",
  "tree": "375ebb214b5ce72e7720610101973129ef266246",
  "parents": [
    "a63562c103840a11632cf08cecc3dfd07897f379"
  ],
  "author": {
    "name": "Antonio Barone",
    "email": "syntonyze@gmail.com",
    "time": "Wed Jun 12 16:36:14 2024 +0200"
  },
  "committer": {
    "name": "Antonio Barone",
    "email": "syntonyze@gmail.com",
    "time": "Wed Jun 12 17:55:15 2024 +0200"
  },
  "message": "Fix reloading of plugins registering dynamic items\n\nWhen change Ia7ed2a06ec3 refactored the `Plugin` hierarchy by\nintroducing different plugin specifications, omitted to inherit the\n`reloadableHandles` from the parent class and instead, introduced a new\n`reloadableHandles` variable in the `JarPlugin` implementation.\n\nThis caused the `Plugin.getReloadableHandles()` to always return an\nempty list, effectively preventing the reloading of the plugin from\nreplacing existing reloadable bindings [1] and creating new ones\ninstead.\n\nWhilst this still allows the `reload` to succeed, it misses the removal\nof the registration handle associated with the old plugin instance,\nwhich will then not be de-registered if the new plugin is disabled later\non.\n\nInherit `reloadableHandles` from the parent `Plugin` class so that\naddition and retrieval of reloadable registration handles targets the\nsame instance variable, allowing the reload to move existing dynamic\nregistration handles to the new plugin instance, rather than creating a\nnew one.\n\n[1] https://gerrit.googlesource.com/gerrit/+/refs/heads/stable-3.8/java/com/google/gerrit/server/plugins/PluginGuiceEnvironment.java#305\n\nBug: Issue 346618790\nRelease-Notes: Fix reload of plugins causing incorrect deregistration of dynamic items\nChange-Id: I13896cf1fcabebc26d465aec7c8debc9dddb11be\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "238066b507f9357eb59dc6ef3f34c8ed922ded13",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/plugins/Plugin.java",
      "new_id": "55add3513a038d50d6bc95d060c9913c3f3abc74",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/plugins/Plugin.java"
    },
    {
      "type": "modify",
      "old_id": "af948b099901b1f03d2fc5e5207c7cb10807c31c",
      "old_mode": 33188,
      "old_path": "java/com/google/gerrit/server/plugins/ServerPlugin.java",
      "new_id": "b90885e058c8ceec1d9312ccea7a6e5d83fedfdd",
      "new_mode": 33188,
      "new_path": "java/com/google/gerrit/server/plugins/ServerPlugin.java"
    }
  ]
}
