You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@helix.apache.org by jx...@apache.org on 2018/07/10 18:38:37 UTC

helix git commit: [HELIX-723] Remove null statement from AssignableInstanceManagerControllerSwitch

Repository: helix
Updated Branches:
  refs/heads/master 96eb69186 -> c35551c37


[HELIX-723] Remove null statement from AssignableInstanceManagerControllerSwitch

Controller was set to null during development of the test and never got removed after finishing writing the test, which caused an NPE.

Changelist:
1. Remove an old null statement in the test


Project: http://git-wip-us.apache.org/repos/asf/helix/repo
Commit: http://git-wip-us.apache.org/repos/asf/helix/commit/c35551c3
Tree: http://git-wip-us.apache.org/repos/asf/helix/tree/c35551c3
Diff: http://git-wip-us.apache.org/repos/asf/helix/diff/c35551c3

Branch: refs/heads/master
Commit: c35551c374a852d89b4ccbe5efd43cb395e33a68
Parents: 96eb691
Author: Hunter Lee <na...@gmail.com>
Authored: Mon Jul 9 18:33:29 2018 -0700
Committer: Hunter Lee <na...@gmail.com>
Committed: Tue Jul 10 11:36:51 2018 -0700

----------------------------------------------------------------------
 .../task/TestAssignableInstanceManagerControllerSwitch.java    | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/helix/blob/c35551c3/helix-core/src/test/java/org/apache/helix/task/TestAssignableInstanceManagerControllerSwitch.java
----------------------------------------------------------------------
diff --git a/helix-core/src/test/java/org/apache/helix/task/TestAssignableInstanceManagerControllerSwitch.java b/helix-core/src/test/java/org/apache/helix/task/TestAssignableInstanceManagerControllerSwitch.java
index 71a5e65..f07d6e3 100644
--- a/helix-core/src/test/java/org/apache/helix/task/TestAssignableInstanceManagerControllerSwitch.java
+++ b/helix-core/src/test/java/org/apache/helix/task/TestAssignableInstanceManagerControllerSwitch.java
@@ -83,12 +83,10 @@ public class TestAssignableInstanceManagerControllerSwitch extends TaskTestBase
 
     // Stop the current controller
     _controller.syncStop();
-    _controller = null;
     // Start a new controller
     String newControllerName = CONTROLLER_PREFIX + "_1";
-    ClusterControllerManager newController =
-        new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME, newControllerName);
-    newController.syncStart();
+    _controller = new ClusterControllerManager(ZK_ADDR, CLUSTER_NAME, newControllerName);
+    _controller.syncStart();
 
     // Generate a new AssignableInstanceManager
     taskDataCache.refresh(accessor, resourceConfigMap);