summaryrefslogtreecommitdiffstats
path: root/container-core/src
diff options
context:
space:
mode:
Diffstat (limited to 'container-core/src')
-rw-r--r--container-core/src/main/java/com/yahoo/component/chain/Chain.java3
-rw-r--r--container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java7
2 files changed, 4 insertions, 6 deletions
diff --git a/container-core/src/main/java/com/yahoo/component/chain/Chain.java b/container-core/src/main/java/com/yahoo/component/chain/Chain.java
index e44eba35efe..24c4a0a0e2e 100644
--- a/container-core/src/main/java/com/yahoo/component/chain/Chain.java
+++ b/container-core/src/main/java/com/yahoo/component/chain/Chain.java
@@ -1,7 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.component.chain;
-import com.google.common.collect.ImmutableList;
import com.yahoo.component.ComponentId;
import com.yahoo.component.chain.dependencies.ordering.ChainBuilder;
@@ -28,7 +27,7 @@ public class Chain<COMPONENT extends ChainedComponent> {
/** Create a chain directly. This will NOT order the chain by the ordering constraints. */
public Chain(ComponentId id, List<COMPONENT> componentList) {
this.id = id;
- this.componentList = ImmutableList.copyOf(componentList);
+ this.componentList = List.copyOf(componentList);
}
/** Create a chain directly. This will NOT order the chain by the ordering constraints. */
diff --git a/container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java b/container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java
index 28645b4bde0..959caa215be 100644
--- a/container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java
+++ b/container-core/src/main/java/com/yahoo/processing/handler/ProcessingResponse.java
@@ -1,7 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing.handler;
-import com.google.common.collect.ImmutableList;
import com.yahoo.container.jdisc.AsyncHttpResponse;
import com.yahoo.container.jdisc.VespaHeaders;
import com.yahoo.jdisc.handler.CompletionHandler;
@@ -110,13 +109,13 @@ public class ProcessingResponse extends AsyncHttpResponse {
private List<ErrorMessage> flattenErrors(Response processingResponse) {
Set<ErrorMessage> errors = flattenErrors(null, processingResponse.data());
- if (errors == null) return Collections.emptyList();
- return ImmutableList.copyOf(errors);
+ if (errors == null) return List.of();
+ return List.copyOf(errors);
}
@SuppressWarnings("unchecked")
private Set<ErrorMessage> flattenErrors(Set<ErrorMessage> errors, Data data) {
- if (data.request() == null) return Collections.EMPTY_SET; // Not allowed, but handle anyway
+ if (data.request() == null) return Set.of(); // Not allowed, but handle anyway
errors = addTo(errors, data.request().errors());
if (data instanceof DataList) {