From 2d6bbe0b8bff09d105b77161c1d26a00ce43bf0c Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Thu, 11 Apr 2024 15:09:55 +0200 Subject: Unify on List.of --- .../java/com/yahoo/vespa/curator/transaction/CuratorOperations.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'zkfacade') diff --git a/zkfacade/src/main/java/com/yahoo/vespa/curator/transaction/CuratorOperations.java b/zkfacade/src/main/java/com/yahoo/vespa/curator/transaction/CuratorOperations.java index 6a3184fa3e1..ed114c7c340 100644 --- a/zkfacade/src/main/java/com/yahoo/vespa/curator/transaction/CuratorOperations.java +++ b/zkfacade/src/main/java/com/yahoo/vespa/curator/transaction/CuratorOperations.java @@ -5,7 +5,6 @@ import com.yahoo.path.Path; import com.yahoo.vespa.curator.Curator; import java.util.ArrayList; -import java.util.Collections; import java.util.List; import java.util.Optional; @@ -62,7 +61,7 @@ public class CuratorOperations { * This does not fail, but returns an empty list if the path does not exist. */ public static List deleteAll(String path, Curator curator) { - if ( ! curator.exists(Path.fromString(path))) return Collections.emptyList(); + if ( ! curator.exists(Path.fromString(path))) return List.of(); List operations = new ArrayList<>(); deleteRecursively(Path.fromString(path), operations, curator); -- cgit v1.2.3