diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2024-04-11 15:09:55 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2024-04-11 21:04:22 +0200 |
commit | 2d6bbe0b8bff09d105b77161c1d26a00ce43bf0c (patch) | |
tree | f9948a9904d837960887e81a956b29f92d918002 /zkfacade | |
parent | 6923743ed320ce339727ad57f6fc2da5f82f5e3f (diff) |
Unify on List.of
Diffstat (limited to 'zkfacade')
-rw-r--r-- | zkfacade/src/main/java/com/yahoo/vespa/curator/transaction/CuratorOperations.java | 3 |
1 files changed, 1 insertions, 2 deletions
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<CuratorOperation> deleteAll(String path, Curator curator) { - if ( ! curator.exists(Path.fromString(path))) return Collections.emptyList(); + if ( ! curator.exists(Path.fromString(path))) return List.of(); List<CuratorOperation> operations = new ArrayList<>(); deleteRecursively(Path.fromString(path), operations, curator); |