diff options
-rw-r--r-- | clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/EventDiffCalculatorTest.java | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/EventDiffCalculatorTest.java b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/EventDiffCalculatorTest.java index 2b44adfba9d..743fddcf48b 100644 --- a/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/EventDiffCalculatorTest.java +++ b/clustercontroller-core/src/test/java/com/yahoo/vespa/clustercontroller/core/EventDiffCalculatorTest.java @@ -82,12 +82,7 @@ public class EventDiffCalculatorTest { return this; } private static AnnotatedClusterState.Builder getBuilder(Map<String, AnnotatedClusterState.Builder> derivedStates, String bucketSpace) { - AnnotatedClusterState.Builder result = derivedStates.get(bucketSpace); - if (result == null) { - result = new AnnotatedClusterState.Builder(); - derivedStates.put(bucketSpace, result); - } - return result; + return derivedStates.computeIfAbsent(bucketSpace, key -> new AnnotatedClusterState.Builder()); } List<Event> computeEventDiff() { |