diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2021-09-23 12:40:05 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2021-09-23 12:40:05 +0200 |
commit | 3284fab4a327451876de4046abae49d43d6aa3ea (patch) | |
tree | 427de1ca38e922f08df28fd54889480a940d54a0 /vdslib/src | |
parent | 8c24cccb36f23336241dbb3fcaf055864b2fccf5 (diff) |
As NodeState is mutable a new one must be created when handing it out
Diffstat (limited to 'vdslib/src')
-rw-r--r-- | vdslib/src/main/java/com/yahoo/vdslib/state/ClusterState.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/vdslib/src/main/java/com/yahoo/vdslib/state/ClusterState.java b/vdslib/src/main/java/com/yahoo/vdslib/state/ClusterState.java index 057dab2289c..154941fb5c0 100644 --- a/vdslib/src/main/java/com/yahoo/vdslib/state/ClusterState.java +++ b/vdslib/src/main/java/com/yahoo/vdslib/state/ClusterState.java @@ -55,8 +55,8 @@ public class ClusterState implements Cloneable { NodeState ns = nodeStates.get(index); if (ns != null) return ns; return (index >= getMaxIndex() || ! upNodes.get(index)) - ? defaultDown() - : defaultUp(); + ? new NodeState(type, State.DOWN) + : new NodeState(type, State.UP); } private void validateInput(Node node, NodeState ns) { |