summaryrefslogtreecommitdiffstats
path: root/container-core
diff options
context:
space:
mode:
authorJon Bratseth <bratseth@gmail.com>2022-06-08 13:40:36 +0200
committerGitHub <noreply@github.com>2022-06-08 13:40:36 +0200
commit14ceb2e5596a30d63a0ae3ea6262f2f41bed93e7 (patch)
treeaca4d958553771a589ec9c423f11725460a5d011 /container-core
parentbba749743bc02b396298579fdf4e076bc8f8c196 (diff)
parentc264cd1c50c81a46eaf11c52a144274bf8cc2f95 (diff)
Merge pull request #22993 from vespa-engine/8
8 MERGEOK
Diffstat (limited to 'container-core')
-rw-r--r--container-core/abi-spec.json68
-rw-r--r--container-core/pom.xml24
-rw-r--r--container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java3
-rw-r--r--container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java1
-rw-r--r--container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java3
-rw-r--r--container-core/src/main/java/com/yahoo/container/di/CloudSubscriberFactory.java1
-rw-r--r--container-core/src/main/java/com/yahoo/container/di/Container.java1
-rw-r--r--container-core/src/main/java/com/yahoo/container/handler/ClustersStatus.java22
-rw-r--r--container-core/src/main/java/com/yahoo/container/handler/VipStatus.java32
-rw-r--r--container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java26
-rw-r--r--container-core/src/main/java/com/yahoo/container/jdisc/utils/MultiPartFormParser.java64
-rw-r--r--container-core/src/main/java/com/yahoo/container/jdisc/utils/package-info.java (renamed from container-core/src/main/java/com/yahoo/container/xml/bind/package-info.java)7
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/DatatypeFactoryProvider.java30
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/DocumentBuilderFactoryProvider.java25
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/SAXParserFactoryProvider.java25
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/SchemaFactoryProvider.java26
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/TransformerFactoryProvider.java25
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/XMLEventFactoryProvider.java27
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/XMLInputFactoryProvider.java32
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/XMLOutputFactoryProvider.java28
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/XPathFactoryProvider.java32
-rw-r--r--container-core/src/main/java/com/yahoo/container/xml/providers/package-info.java5
-rw-r--r--container-core/src/main/java/com/yahoo/jdisc/http/Cookie.java5
-rw-r--r--container-core/src/main/java/com/yahoo/jdisc/http/SecretStore.java23
-rw-r--r--container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterRequest.java19
-rw-r--r--container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterResponse.java8
-rw-r--r--container-core/src/main/java/com/yahoo/jdisc/http/filter/JdiscFilterRequest.java17
-rw-r--r--container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/ConnectorFactory.java16
-rw-r--r--container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollector.java4
-rw-r--r--container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/MetricDefinitions.java2
-rw-r--r--container-core/src/main/java/com/yahoo/processing/Response.java9
-rw-r--r--container-core/src/main/java/com/yahoo/processing/impl/ProcessingFuture.java5
-rw-r--r--container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousSectionedRenderer.java11
-rw-r--r--container-core/src/main/java/com/yahoo/processing/rendering/Renderer.java20
-rw-r--r--container-core/src/main/java/com/yahoo/processing/response/AbstractDataList.java11
-rw-r--r--container-core/src/main/java/com/yahoo/processing/response/DataList.java6
-rw-r--r--container-core/src/main/java/com/yahoo/processing/response/DefaultIncomingData.java8
-rw-r--r--container-core/src/main/java/com/yahoo/processing/response/IncomingData.java13
-rw-r--r--container-core/src/main/java/org/json/package-info.java5
-rw-r--r--container-core/src/main/resources/configdefinitions/container.core.vip-status.def2
-rw-r--r--container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.connector.def4
-rw-r--r--container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.server.def11
-rw-r--r--container-core/src/main/resources/configdefinitions/metrics.metrics-presentation.def6
-rw-r--r--container-core/src/test/java/com/yahoo/container/di/DirConfigSource.java1
-rw-r--r--container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTestBase.java1
-rw-r--r--container-core/src/test/java/com/yahoo/container/xml/providers/XMLProviderTest.java84
-rw-r--r--container-core/src/test/java/com/yahoo/jdisc/http/HttpRequestTestCase.java3
-rw-r--r--container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterRequestTest.java55
-rw-r--r--container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterResponseTest.java10
-rw-r--r--container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java2
-rw-r--r--container-core/src/test/java/com/yahoo/processing/ResponseTestCase.java4
-rw-r--r--container-core/src/test/java/com/yahoo/processing/execution/test/FutureDataTestCase.java16
-rw-r--r--container-core/src/test/java/com/yahoo/processing/execution/test/StreamingTestCase.java4
-rw-r--r--container-core/src/test/java/com/yahoo/processing/rendering/AsynchronousSectionedRendererTest.java38
-rw-r--r--container-core/src/test/java/com/yahoo/processing/test/documentation/AsyncDataProcessingInitiator.java7
55 files changed, 123 insertions, 814 deletions
diff --git a/container-core/abi-spec.json b/container-core/abi-spec.json
index 8ca6507f73e..70b4faa342e 100644
--- a/container-core/abi-spec.json
+++ b/container-core/abi-spec.json
@@ -171,10 +171,6 @@
"methods": [
"public void <init>()",
"public void setClusters(java.util.Set)",
- "public void setReceiveTrafficByDefault(boolean)",
- "public void setUp(java.lang.Object)",
- "public void setDown(java.lang.Object)",
- "public boolean containerShouldReceiveTraffic()",
"public boolean containerShouldReceiveTraffic(com.yahoo.container.handler.ClustersStatus$Require)"
],
"fields": []
@@ -359,7 +355,6 @@
"public static java.lang.String getDefMd5()",
"public static java.lang.String getDefName()",
"public static java.lang.String getDefNamespace()",
- "public static java.lang.String getDefVersion()",
"public void <init>(com.yahoo.container.handler.ThreadpoolConfig$Builder)",
"public int maxthreads()",
"public int corePoolSize()",
@@ -372,7 +367,6 @@
"public static final java.lang.String CONFIG_DEF_MD5",
"public static final java.lang.String CONFIG_DEF_NAME",
"public static final java.lang.String CONFIG_DEF_NAMESPACE",
- "public static final java.lang.String CONFIG_DEF_VERSION",
"public static final java.lang.String[] CONFIG_DEF_SCHEMA"
]
},
@@ -402,14 +396,9 @@
"public void <init>(com.yahoo.container.handler.ClustersStatus)",
"public void <init>(com.yahoo.container.QrSearchersConfig, com.yahoo.container.handler.ClustersStatus)",
"public void <init>(com.yahoo.container.QrSearchersConfig, com.yahoo.container.core.VipStatusConfig, com.yahoo.container.handler.ClustersStatus, com.yahoo.container.jdisc.state.StateMonitor, com.yahoo.jdisc.Metric)",
- "public void <init>(com.yahoo.container.QrSearchersConfig, com.yahoo.container.core.VipStatusConfig, com.yahoo.container.handler.ClustersStatus, com.yahoo.container.jdisc.state.StateMonitor)",
- "public void <init>(com.yahoo.container.QrSearchersConfig, com.yahoo.container.handler.ClustersStatus, com.yahoo.container.jdisc.state.StateMonitor)",
- "public void <init>(com.yahoo.container.QrSearchersConfig, com.yahoo.container.core.VipStatusConfig, com.yahoo.container.handler.ClustersStatus)",
"public void setInRotation(java.lang.Boolean)",
"public void addToRotation(java.lang.String)",
"public void removeFromRotation(java.lang.String)",
- "public void addToRotation(java.lang.Object)",
- "public void removeFromRotation(java.lang.Object)",
"public boolean isInRotation()"
],
"fields": []
@@ -732,11 +721,9 @@
"public"
],
"methods": [
- "public void <init>(java.util.concurrent.Executor, com.yahoo.container.logging.AccessLog, com.yahoo.jdisc.Metric)",
"public void <init>(java.util.concurrent.Executor, com.yahoo.jdisc.Metric)",
"public void <init>(com.yahoo.container.jdisc.LoggingRequestHandler$Context)",
"public java.util.concurrent.Executor getExecutor()",
- "public com.yahoo.container.logging.AccessLog getAccessLog()",
"public com.yahoo.jdisc.Metric getMetric()"
],
"fields": []
@@ -751,12 +738,9 @@
"methods": [
"public static com.yahoo.container.jdisc.LoggingRequestHandler$Context testOnlyContext()",
"public void <init>(com.yahoo.container.jdisc.LoggingRequestHandler$Context)",
- "public void <init>(java.util.concurrent.Executor, com.yahoo.container.logging.AccessLog)",
"public void <init>(java.util.concurrent.Executor)",
"public void <init>(com.yahoo.container.jdisc.LoggingRequestHandler$Context, boolean)",
"public void <init>(java.util.concurrent.Executor, com.yahoo.jdisc.Metric)",
- "public void <init>(java.util.concurrent.Executor, com.yahoo.container.logging.AccessLog, com.yahoo.jdisc.Metric)",
- "public void <init>(java.util.concurrent.Executor, com.yahoo.container.logging.AccessLog, com.yahoo.jdisc.Metric, boolean)",
"public void <init>(java.util.concurrent.Executor, com.yahoo.jdisc.Metric, boolean)",
"protected com.yahoo.container.jdisc.LoggingCompletionHandler createLoggingCompletionHandler(long, long, com.yahoo.container.jdisc.HttpResponse, com.yahoo.container.jdisc.HttpRequest, com.yahoo.container.jdisc.ContentChannelOutputStream)"
],
@@ -1057,7 +1041,6 @@
"public com.yahoo.jdisc.http.ConnectorConfig$Builder acceptQueueSize(int)",
"public com.yahoo.jdisc.http.ConnectorConfig$Builder reuseAddress(boolean)",
"public com.yahoo.jdisc.http.ConnectorConfig$Builder idleTimeout(double)",
- "public com.yahoo.jdisc.http.ConnectorConfig$Builder stopTimeout(double)",
"public com.yahoo.jdisc.http.ConnectorConfig$Builder tcpKeepAliveEnabled(boolean)",
"public com.yahoo.jdisc.http.ConnectorConfig$Builder tcpNoDelay(boolean)",
"public com.yahoo.jdisc.http.ConnectorConfig$Builder throttling(com.yahoo.jdisc.http.ConnectorConfig$Throttling$Builder)",
@@ -1409,7 +1392,6 @@
"public static java.lang.String getDefMd5()",
"public static java.lang.String getDefName()",
"public static java.lang.String getDefNamespace()",
- "public static java.lang.String getDefVersion()",
"public void <init>(com.yahoo.jdisc.http.ConnectorConfig$Builder)",
"public int listenPort()",
"public java.lang.String name()",
@@ -1420,7 +1402,6 @@
"public int acceptQueueSize()",
"public boolean reuseAddress()",
"public double idleTimeout()",
- "public double stopTimeout()",
"public boolean tcpKeepAliveEnabled()",
"public boolean tcpNoDelay()",
"public com.yahoo.jdisc.http.ConnectorConfig$Throttling throttling()",
@@ -1439,7 +1420,6 @@
"public static final java.lang.String CONFIG_DEF_MD5",
"public static final java.lang.String CONFIG_DEF_NAME",
"public static final java.lang.String CONFIG_DEF_NAMESPACE",
- "public static final java.lang.String CONFIG_DEF_VERSION",
"public static final java.lang.String[] CONFIG_DEF_SCHEMA"
]
},
@@ -1493,7 +1473,6 @@
"public static java.lang.String toCookieHeader(java.lang.Iterable)",
"public static java.util.List fromCookieHeader(java.lang.String)",
"public static java.util.List toSetCookieHeaders(java.lang.Iterable)",
- "public static java.util.List toSetCookieHeaderAll(java.lang.Iterable)",
"public static com.yahoo.jdisc.http.Cookie fromSetCookieHeader(java.lang.String)"
],
"fields": []
@@ -1768,20 +1747,6 @@
],
"fields": []
},
- "com.yahoo.jdisc.http.SecretStore": {
- "superClass": "java.lang.Object",
- "interfaces": [],
- "attributes": [
- "public",
- "interface",
- "abstract"
- ],
- "methods": [
- "public abstract java.lang.String getSecret(java.lang.String)",
- "public java.lang.String getSecret(java.lang.String, int)"
- ],
- "fields": []
- },
"com.yahoo.jdisc.http.ServerConfig$AccessLog$Builder": {
"superClass": "java.lang.Object",
"interfaces": [
@@ -1833,8 +1798,6 @@
"public void <init>(com.yahoo.jdisc.http.ServerConfig)",
"public com.yahoo.jdisc.http.ServerConfig$Builder developerMode(boolean)",
"public com.yahoo.jdisc.http.ServerConfig$Builder responseCompressionLevel(int)",
- "public com.yahoo.jdisc.http.ServerConfig$Builder httpKeepAliveEnabled(boolean)",
- "public com.yahoo.jdisc.http.ServerConfig$Builder maxKeepAliveRequests(int)",
"public com.yahoo.jdisc.http.ServerConfig$Builder removeRawPostBodyForWwwUrlEncodedPost(boolean)",
"public com.yahoo.jdisc.http.ServerConfig$Builder filter(com.yahoo.jdisc.http.ServerConfig$Filter$Builder)",
"public com.yahoo.jdisc.http.ServerConfig$Builder filter(java.util.function.Consumer)",
@@ -2062,12 +2025,9 @@
"public static java.lang.String getDefMd5()",
"public static java.lang.String getDefName()",
"public static java.lang.String getDefNamespace()",
- "public static java.lang.String getDefVersion()",
"public void <init>(com.yahoo.jdisc.http.ServerConfig$Builder)",
"public boolean developerMode()",
"public int responseCompressionLevel()",
- "public boolean httpKeepAliveEnabled()",
- "public int maxKeepAliveRequests()",
"public boolean removeRawPostBodyForWwwUrlEncodedPost()",
"public java.util.List filter()",
"public com.yahoo.jdisc.http.ServerConfig$Filter filter(int)",
@@ -2086,7 +2046,6 @@
"public static final java.lang.String CONFIG_DEF_MD5",
"public static final java.lang.String CONFIG_DEF_NAME",
"public static final java.lang.String CONFIG_DEF_NAMESPACE",
- "public static final java.lang.String CONFIG_DEF_VERSION",
"public static final java.lang.String[] CONFIG_DEF_SCHEMA"
]
},
@@ -2168,8 +2127,6 @@
"public java.lang.String getMethod()",
"public com.yahoo.jdisc.http.HttpRequest$Version getVersion()",
"public java.net.URI getUri()",
- "public void setUri(java.net.URI)",
- "public com.yahoo.jdisc.http.HttpRequest getParentRequest()",
"public java.lang.String getRemoteAddr()",
"public void setRemoteAddr(java.lang.String)",
"public java.lang.String getLocalAddr()",
@@ -2211,7 +2168,6 @@
"public java.lang.String getRequestURI()",
"public java.lang.String getRequestedSessionId()",
"public java.lang.String getScheme()",
- "public void setScheme(java.lang.String, boolean)",
"public java.lang.String getServerName()",
"public int getServerPort()",
"public java.security.Principal getUserPrincipal()",
@@ -2263,7 +2219,6 @@
"public void setCookies(java.util.List)",
"public int getStatus()",
"public void setStatus(int)",
- "public com.yahoo.jdisc.http.HttpResponse getParentResponse()",
"public void addCookie(com.yahoo.jdisc.http.filter.JDiscCookieWrapper)",
"public void sendError(int)",
"public void setCookie(java.lang.String, java.lang.String)"
@@ -2311,17 +2266,6 @@
],
"fields": []
},
- "com.yahoo.jdisc.http.filter.JdiscFilterRequest": {
- "superClass": "com.yahoo.jdisc.http.filter.DiscFilterRequest",
- "interfaces": [],
- "attributes": [
- "public"
- ],
- "methods": [
- "public void <init>(com.yahoo.jdisc.http.HttpRequest)"
- ],
- "fields": []
- },
"com.yahoo.jdisc.http.filter.RequestFilter": {
"superClass": "java.lang.Object",
"interfaces": [
@@ -2850,8 +2794,7 @@
"public void <init>(com.yahoo.processing.Request, com.yahoo.processing.request.ErrorMessage)",
"public void mergeWith(com.yahoo.processing.Response)",
"public com.yahoo.processing.response.DataList data()",
- "public static java.util.concurrent.CompletableFuture recursiveFuture(com.yahoo.processing.response.DataList)",
- "public static com.google.common.util.concurrent.ListenableFuture recursiveComplete(com.yahoo.processing.response.DataList)"
+ "public static java.util.concurrent.CompletableFuture recursiveFuture(com.yahoo.processing.response.DataList)"
],
"fields": []
},
@@ -3152,7 +3095,6 @@
"public final java.util.concurrent.CompletableFuture renderResponse(java.io.OutputStream, com.yahoo.processing.Response, com.yahoo.processing.execution.Execution, com.yahoo.processing.Request)",
"public void deconstruct()",
"public final java.util.concurrent.CompletableFuture renderResponseBeforeHandover(java.io.OutputStream, com.yahoo.processing.Response, com.yahoo.processing.execution.Execution, com.yahoo.processing.Request)",
- "public final com.google.common.util.concurrent.ListenableFuture renderBeforeHandover(java.io.OutputStream, com.yahoo.processing.Response, com.yahoo.processing.execution.Execution, com.yahoo.processing.Request)",
"public com.yahoo.processing.execution.Execution getExecution()",
"public com.yahoo.processing.Response getResponse()",
"protected boolean clientClosed()",
@@ -3197,8 +3139,7 @@
"public void <init>()",
"public com.yahoo.processing.rendering.Renderer clone()",
"public void init()",
- "public com.google.common.util.concurrent.ListenableFuture render(java.io.OutputStream, com.yahoo.processing.Response, com.yahoo.processing.execution.Execution, com.yahoo.processing.Request)",
- "public java.util.concurrent.CompletableFuture renderResponse(java.io.OutputStream, com.yahoo.processing.Response, com.yahoo.processing.execution.Execution, com.yahoo.processing.Request)",
+ "public abstract java.util.concurrent.CompletableFuture renderResponse(java.io.OutputStream, com.yahoo.processing.Response, com.yahoo.processing.execution.Execution, com.yahoo.processing.Request)",
"public abstract java.lang.String getEncoding()",
"public abstract java.lang.String getMimeType()",
"public bridge synthetic com.yahoo.component.AbstractComponent clone()",
@@ -3437,7 +3378,6 @@
"protected void <init>(com.yahoo.processing.Request, com.yahoo.processing.response.IncomingData, boolean, boolean)",
"public com.yahoo.processing.Request request()",
"public com.yahoo.processing.response.IncomingData incoming()",
- "public com.google.common.util.concurrent.ListenableFuture complete()",
"public java.util.concurrent.CompletableFuture completeFuture()",
"public boolean isOrdered()",
"public boolean isStreamed()",
@@ -3498,7 +3438,6 @@
"public abstract java.util.List asList()",
"public abstract com.yahoo.processing.response.IncomingData incoming()",
"public abstract java.util.concurrent.CompletableFuture completeFuture()",
- "public abstract com.google.common.util.concurrent.ListenableFuture complete()",
"public abstract void addDataListener(java.lang.Runnable)",
"public void close()"
],
@@ -3517,7 +3456,6 @@
"public void <init>(com.yahoo.processing.response.DataList)",
"public final void assignOwner(com.yahoo.processing.response.DataList)",
"public com.yahoo.processing.response.DataList getOwner()",
- "public com.google.common.util.concurrent.ListenableFuture completed()",
"public java.util.concurrent.CompletableFuture completedFuture()",
"public synchronized boolean isComplete()",
"public synchronized void addLast(com.yahoo.processing.response.Data)",
@@ -3582,7 +3520,6 @@
],
"methods": [
"public void <init>(com.yahoo.processing.response.DataList)",
- "public com.google.common.util.concurrent.ListenableFuture completed()",
"public java.util.concurrent.CompletableFuture completedFuture()",
"public com.yahoo.processing.response.DataList getOwner()",
"public boolean isComplete()",
@@ -3608,7 +3545,6 @@
"methods": [
"public abstract com.yahoo.processing.response.DataList getOwner()",
"public abstract java.util.concurrent.CompletableFuture completedFuture()",
- "public abstract com.google.common.util.concurrent.ListenableFuture completed()",
"public abstract boolean isComplete()",
"public abstract void addLast(com.yahoo.processing.response.Data)",
"public abstract void add(com.yahoo.processing.response.Data)",
diff --git a/container-core/pom.xml b/container-core/pom.xml
index 4b47cfde122..2689d2794b3 100644
--- a/container-core/pom.xml
+++ b/container-core/pom.xml
@@ -8,11 +8,11 @@
<parent>
<groupId>com.yahoo.vespa</groupId>
<artifactId>parent</artifactId>
- <version>7-SNAPSHOT</version>
+ <version>8-SNAPSHOT</version>
<relativePath>../parent/pom.xml</relativePath>
</parent>
<artifactId>container-core</artifactId>
- <version>7-SNAPSHOT</version>
+ <version>8-SNAPSHOT</version>
<packaging>container-plugin</packaging>
<dependencies>
@@ -104,21 +104,6 @@
</dependency>
<dependency>
<groupId>com.yahoo.vespa</groupId>
- <artifactId>statistics</artifactId>
- <version>${project.version}</version>
- <exclusions>
- <exclusion>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- </exclusion>
- <exclusion>
- <groupId>com.yahoo.vespa</groupId>
- <artifactId>config</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>com.yahoo.vespa</groupId>
<artifactId>vdslib</artifactId>
<version>${project.version}</version>
</dependency>
@@ -126,11 +111,6 @@
<groupId>org.hdrhistogram</groupId>
<artifactId>HdrHistogram</artifactId>
</dependency>
- <dependency>
- <!-- TODO Vespa 8: stop providing org.json:json -->
- <groupId>org.json</groupId>
- <artifactId>json</artifactId>
- </dependency>
<!-- PROVIDED scope -->
<dependency>
diff --git a/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java b/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java
index decb0513e26..8aee2d43187 100644
--- a/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java
+++ b/container-core/src/main/java/com/yahoo/container/core/config/HandlersConfigurerDi.java
@@ -20,7 +20,6 @@ import com.yahoo.jdisc.service.ClientProvider;
import com.yahoo.jdisc.service.ServerProvider;
import com.yahoo.osgi.OsgiImpl;
import com.yahoo.osgi.OsgiWrapper;
-import com.yahoo.statistics.Statistics;
import org.osgi.framework.Bundle;
import java.util.ArrayList;
@@ -118,7 +117,6 @@ public class HandlersConfigurerDi {
return result.oldComponentsCleanupTask();
}
- @SuppressWarnings("deprecation")
private Injector createFallbackInjector(com.yahoo.container.Container vespaContainer, Injector discInjector) {
return discInjector.createChildInjector(new AbstractModule() {
@Override
@@ -126,7 +124,6 @@ public class HandlersConfigurerDi {
// Provide a singleton instance for all component fallbacks,
// otherwise fallback injection may lead to a cascade of components requiring reconstruction.
bind(com.yahoo.container.Container.class).toInstance(vespaContainer);
- bind(com.yahoo.statistics.Statistics.class).toInstance(Statistics.nullImplementation);
bind(AccessLog.class).toInstance(AccessLog.NONE_INSTANCE);
bind(Executor.class).toInstance(fallbackExecutor);
if (vespaContainer.getFileAcquirer() != null)
diff --git a/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java b/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java
index 96a479ac7ad..62d36ec34ec 100644
--- a/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java
+++ b/container-core/src/main/java/com/yahoo/container/core/config/testutil/HandlersConfigurerTestWrapper.java
@@ -39,7 +39,6 @@ import java.util.concurrent.Executors;
*/
public class HandlersConfigurerTestWrapper {
- @SuppressWarnings("removal") // TODO Vespa 8: remove
private final ConfigSourceSet configSources =
new ConfigSourceSet(this.getClass().getSimpleName() + ": " + new Random().nextLong());
private final HandlersConfigurerDi configurer;
diff --git a/container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java b/container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java
index 2acbec2e388..5cbb009d54b 100644
--- a/container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java
+++ b/container-core/src/main/java/com/yahoo/container/di/CloudSubscriber.java
@@ -7,11 +7,9 @@ import com.yahoo.config.subscription.ConfigSource;
import com.yahoo.config.subscription.ConfigSubscriber;
import com.yahoo.container.di.config.Subscriber;
import com.yahoo.vespa.config.ConfigKey;
-
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
-import java.util.logging.Level;
import java.util.logging.Logger;
import static java.util.logging.Level.FINE;
@@ -21,7 +19,6 @@ import static java.util.logging.Level.FINE;
* @author Tony Vaagenes
* @author ollivir
*/
-@SuppressWarnings("removal") // TODO Vespa 8: remove
public class CloudSubscriber implements Subscriber {
private static final Logger log = Logger.getLogger(CloudSubscriber.class.getName());
diff --git a/container-core/src/main/java/com/yahoo/container/di/CloudSubscriberFactory.java b/container-core/src/main/java/com/yahoo/container/di/CloudSubscriberFactory.java
index a58baa5b2bd..a6327b01e21 100644
--- a/container-core/src/main/java/com/yahoo/container/di/CloudSubscriberFactory.java
+++ b/container-core/src/main/java/com/yahoo/container/di/CloudSubscriberFactory.java
@@ -20,7 +20,6 @@ import java.util.WeakHashMap;
* @author Tony Vaagenes
* @author ollivir
*/
-@SuppressWarnings("removal") // TODO Vespa 8: remove
public class CloudSubscriberFactory implements SubscriberFactory {
private final ConfigSource configSource;
diff --git a/container-core/src/main/java/com/yahoo/container/di/Container.java b/container-core/src/main/java/com/yahoo/container/di/Container.java
index 9977813b533..68dda5fbc4c 100644
--- a/container-core/src/main/java/com/yahoo/container/di/Container.java
+++ b/container-core/src/main/java/com/yahoo/container/di/Container.java
@@ -237,7 +237,6 @@ public class Container {
}
}
- @SuppressWarnings("removal") // TODO Vespa 8: remove
private void invalidateGeneration(long generation, Throwable cause) {
leastGeneration = Math.max(retriever.getComponentsGeneration(), retriever.getBootstrapGeneration()) + 1;
if (!(cause instanceof InterruptedException) && !(cause instanceof ConfigInterruptedException) && !(cause instanceof SubscriberClosedException)) {
diff --git a/container-core/src/main/java/com/yahoo/container/handler/ClustersStatus.java b/container-core/src/main/java/com/yahoo/container/handler/ClustersStatus.java
index ad797c283c6..13839dd82c1 100644
--- a/container-core/src/main/java/com/yahoo/container/handler/ClustersStatus.java
+++ b/container-core/src/main/java/com/yahoo/container/handler/ClustersStatus.java
@@ -51,11 +51,6 @@ public class ClustersStatus extends AbstractComponent {
}
}
- /** @deprecated this is ignored */
- @Deprecated // TODO: remove on Vespa 8
- public void setReceiveTrafficByDefault(boolean receiveTrafficByDefault) {
- }
-
void setUp(String clusterIdentifier) {
synchronized (mutex) {
clusterStatus.put(clusterIdentifier, Boolean.TRUE);
@@ -68,23 +63,6 @@ public class ClustersStatus extends AbstractComponent {
}
}
- /** @deprecated use setUp(String) instead */
- @Deprecated // TODO: Remove on Vespa 8
- public void setUp(Object clusterIdentifier) {
- setUp((String) clusterIdentifier);
- }
-
- /** @deprecated use setDown(String) instead */
- @Deprecated // TODO: Remove on Vespa 8
- public void setDown(Object clusterIdentifier) {
- setDown((String) clusterIdentifier);
- }
-
- @Deprecated // TODO: Remove on Vespa 8
- public boolean containerShouldReceiveTraffic() {
- return containerShouldReceiveTraffic(Require.ONE);
- }
-
/**
* Returns whether this container should receive traffic based on the state of this
*
diff --git a/container-core/src/main/java/com/yahoo/container/handler/VipStatus.java b/container-core/src/main/java/com/yahoo/container/handler/VipStatus.java
index 559c097618f..8e8b674c888 100644
--- a/container-core/src/main/java/com/yahoo/container/handler/VipStatus.java
+++ b/container-core/src/main/java/com/yahoo/container/handler/VipStatus.java
@@ -54,7 +54,7 @@ public class VipStatus {
/** For testing */
public VipStatus(QrSearchersConfig dispatchers, ClustersStatus clustersStatus) {
- this(dispatchers, new VipStatusConfig.Builder().build(), clustersStatus, StateMonitor.createForTesting());
+ this(dispatchers, new VipStatusConfig.Builder().build(), clustersStatus, StateMonitor.createForTesting(), new NullMetric());
}
@Inject
@@ -71,24 +71,6 @@ public class VipStatus {
updateCurrentlyInRotation();
}
- @Deprecated // TODO: Remove on Vespa 8
- public VipStatus(QrSearchersConfig dispatchers,
- VipStatusConfig vipStatusConfig,
- ClustersStatus clustersStatus,
- StateMonitor healthState) {
- this(dispatchers, vipStatusConfig, clustersStatus, healthState, new NullMetric());
- }
-
- @Deprecated // TODO: Remove on Vespa 8
- public VipStatus(QrSearchersConfig dispatchers, ClustersStatus clustersStatus, StateMonitor healthState) {
- this(dispatchers, new VipStatusConfig.Builder().build(), clustersStatus, healthState);
- }
-
- @Deprecated // TODO: Remove on Vespa 8
- public VipStatus(QrSearchersConfig dispatchers, VipStatusConfig ignored, ClustersStatus clustersStatus) {
- this(dispatchers, clustersStatus);
- }
-
/**
* Explicitly set this container in or out of rotation
*
@@ -114,18 +96,6 @@ public class VipStatus {
updateCurrentlyInRotation();
}
- /** @deprecated use addToRotation(String) instead */
- @Deprecated // TODO: Remove on Vespa 8
- public void addToRotation(Object clusterIdentifier) {
- addToRotation((String) clusterIdentifier);
- }
-
- /** @deprecated use removeFromRotation(String) instead */
- @Deprecated // TODO: Remove on Vespa 8
- public void removeFromRotation(Object clusterIdentifier) {
- removeFromRotation((String) clusterIdentifier);
- }
-
private void updateCurrentlyInRotation() {
synchronized (mutex) {
if (rotationOverride != null) {
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java b/container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java
index c6735559429..fa4ed9a4afa 100644
--- a/container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java
+++ b/container-core/src/main/java/com/yahoo/container/jdisc/LoggingRequestHandler.java
@@ -28,7 +28,6 @@ import java.util.logging.Level;
*
* @deprecated Use {@link ThreadedHttpRequestHandler}, which provides the same level of functionality.
*/
-// TODO Vespa 8: Remove deprecated constructors
@Deprecated
public abstract class LoggingRequestHandler extends ThreadedHttpRequestHandler {
@@ -38,12 +37,6 @@ public abstract class LoggingRequestHandler extends ThreadedHttpRequestHandler {
final Executor executor;
final Metric metric;
- /** @deprecated Use {@link #Context(Executor, Metric)} instead */
- @Deprecated(forRemoval = true, since = "7")
- public Context(Executor executor, AccessLog ignored, Metric metric) {
- this(executor, metric);
- }
-
@Inject
public Context(Executor executor, Metric metric) {
this.executor = executor;
@@ -56,7 +49,6 @@ public abstract class LoggingRequestHandler extends ThreadedHttpRequestHandler {
}
public Executor getExecutor() { return executor; }
- @Deprecated(forRemoval = true, since = "7") public AccessLog getAccessLog() { return null; }
public Metric getMetric() { return metric; }
}
@@ -76,12 +68,6 @@ public abstract class LoggingRequestHandler extends ThreadedHttpRequestHandler {
this(ctx.executor, ctx.metric);
}
- /** @deprecated Use {@link #LoggingRequestHandler(Executor)} instead */
- @Deprecated(forRemoval = true, since = "7")
- public LoggingRequestHandler(Executor executor, AccessLog ignored) {
- this(executor, (Metric)null);
- }
-
public LoggingRequestHandler(Executor executor) {
this(executor, (Metric)null);
}
@@ -94,18 +80,6 @@ public abstract class LoggingRequestHandler extends ThreadedHttpRequestHandler {
this(executor, metric, false);
}
- /** @deprecated Use {@link #LoggingRequestHandler(Executor, Metric)} instead */
- @Deprecated(forRemoval = true, since = "7")
- public LoggingRequestHandler(Executor executor, AccessLog ignored, Metric metric) {
- this(executor, metric, false);
- }
-
- /** @deprecated Use {@link #LoggingRequestHandler(Executor, Metric, boolean)} instead */
- @Deprecated(forRemoval = true, since = "7")
- public LoggingRequestHandler(Executor executor, AccessLog ignored, Metric metric, boolean allowAsyncResponse) {
- this(executor, metric, allowAsyncResponse);
- }
-
public LoggingRequestHandler(Executor executor, Metric metric, boolean allowAsyncResponse) {
super(executor, metric, allowAsyncResponse);
}
diff --git a/container-core/src/main/java/com/yahoo/container/jdisc/utils/MultiPartFormParser.java b/container-core/src/main/java/com/yahoo/container/jdisc/utils/MultiPartFormParser.java
new file mode 100644
index 00000000000..104d2f8ae4a
--- /dev/null
+++ b/container-core/src/main/java/com/yahoo/container/jdisc/utils/MultiPartFormParser.java
@@ -0,0 +1,64 @@
+// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+package com.yahoo.container.jdisc.utils;
+
+import com.yahoo.container.jdisc.HttpRequest;
+import org.eclipse.jetty.http.MultiPartFormInputStream;
+
+import javax.servlet.http.Part;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Map;
+import java.util.TreeMap;
+
+/**
+ * Wrapper around Jetty's {@link MultiPartFormInputStream}.
+ *
+ * @author bjorncs
+ */
+public class MultiPartFormParser {
+
+ private final MultiPartFormInputStream multipart;
+
+ public MultiPartFormParser(InputStream in, String contentType) {
+ this.multipart = new MultiPartFormInputStream(in, contentType, /*config*/null, /*contextTmpDir*/null);
+ }
+
+ public MultiPartFormParser(HttpRequest request) { this(request.getData(), request.getHeader("Content-Type")); }
+
+ public Map<String, PartItem> readParts() throws MultiPartException {
+ try {
+ Map<String, PartItem> result = new TreeMap<>();
+ for (Part servletPart : multipart.getParts()) {
+ result.put(servletPart.getName(), new PartItem(servletPart));
+ }
+ return result;
+ } catch (Exception e) {
+ throw new MultiPartException(e.getCause());
+ }
+ }
+
+ public static class PartItem {
+ private final String name;
+ private final InputStream data;
+ private final String contentType;
+
+ private PartItem(Part servletPart) throws IOException {
+ this(servletPart.getName(), servletPart.getInputStream(), servletPart.getContentType());
+ }
+
+ public PartItem(String name, InputStream data, String contentType) {
+ this.name = name;
+ this.data = data;
+ this.contentType = contentType;
+ }
+
+ public String name() { return name; }
+ public InputStream data() { return data; }
+ public String contentType() { return contentType; }
+ }
+
+ public static class MultiPartException extends IOException {
+ public MultiPartException(Throwable cause) { super(cause.getMessage(), cause); }
+ }
+
+}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/bind/package-info.java b/container-core/src/main/java/com/yahoo/container/jdisc/utils/package-info.java
index e6850261f2c..d21e73a4ec2 100644
--- a/container-core/src/main/java/com/yahoo/container/xml/bind/package-info.java
+++ b/container-core/src/main/java/com/yahoo/container/jdisc/utils/package-info.java
@@ -1,5 +1,10 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
+/**
+ * Internal utils that are not public api
+ *
+ * @author bjorncs
+ */
@ExportPackage
-package com.yahoo.container.xml.bind;
+package com.yahoo.container.jdisc.utils;
import com.yahoo.osgi.annotation.ExportPackage;
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/DatatypeFactoryProvider.java b/container-core/src/main/java/com/yahoo/container/xml/providers/DatatypeFactoryProvider.java
deleted file mode 100644
index 4777d588d48..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/DatatypeFactoryProvider.java
+++ /dev/null
@@ -1,30 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.container.di.componentgraph.Provider;
-
-import javax.xml.datatype.DatatypeConfigurationException;
-import javax.xml.datatype.DatatypeFactory;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated Do not use!
- */
-@Deprecated // TODO: Remove on Vespa 8
-public class DatatypeFactoryProvider implements Provider<DatatypeFactory> {
-
- public static final String FACTORY_CLASS = DatatypeFactory.DATATYPEFACTORY_IMPLEMENTATION_CLASS;
-
- @Override
- public DatatypeFactory get() {
- try {
- return DatatypeFactory.newInstance(FACTORY_CLASS, this.getClass().getClassLoader());
- } catch (DatatypeConfigurationException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void deconstruct() { }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/DocumentBuilderFactoryProvider.java b/container-core/src/main/java/com/yahoo/container/xml/providers/DocumentBuilderFactoryProvider.java
deleted file mode 100644
index 769c3d7d7da..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/DocumentBuilderFactoryProvider.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.container.di.componentgraph.Provider;
-
-import javax.xml.parsers.DocumentBuilderFactory;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated Do not use!
- */
-@Deprecated // TODO: Remove on Vespa 8
-public class DocumentBuilderFactoryProvider implements Provider<DocumentBuilderFactory> {
-
- public static final String FACTORY_CLASS = "com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderFactoryImpl";
-
- @Override
- public DocumentBuilderFactory get() {
- return DocumentBuilderFactory.newInstance(FACTORY_CLASS, this.getClass().getClassLoader());
- }
-
- @Override
- public void deconstruct() { }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/SAXParserFactoryProvider.java b/container-core/src/main/java/com/yahoo/container/xml/providers/SAXParserFactoryProvider.java
deleted file mode 100644
index 8dafbe3042a..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/SAXParserFactoryProvider.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.container.di.componentgraph.Provider;
-
-import javax.xml.parsers.SAXParserFactory;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated Do not use!
- */
-@Deprecated // TODO: Remove on Vespa 8
-public class SAXParserFactoryProvider implements Provider<SAXParserFactory> {
-
- public static final String FACTORY_CLASS = "com.sun.org.apache.xerces.internal.jaxp.SAXParserFactoryImpl";
-
- @Override
- public SAXParserFactory get() {
- return SAXParserFactory.newInstance(FACTORY_CLASS, this.getClass().getClassLoader());
- }
-
- @Override
- public void deconstruct() { }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/SchemaFactoryProvider.java b/container-core/src/main/java/com/yahoo/container/xml/providers/SchemaFactoryProvider.java
deleted file mode 100644
index 344686a252e..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/SchemaFactoryProvider.java
+++ /dev/null
@@ -1,26 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.container.di.componentgraph.Provider;
-
-import javax.xml.XMLConstants;
-import javax.xml.validation.SchemaFactory;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated Do not use!
- */
-@Deprecated // TODO: Remove on Vespa 8
-public class SchemaFactoryProvider implements Provider<SchemaFactory> {
-
- public static final String FACTORY_CLASS = "com.sun.org.apache.xerces.internal.jaxp.validation.XMLSchemaFactory";
-
- @Override
- public SchemaFactory get() {
- return SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI, FACTORY_CLASS, this.getClass().getClassLoader());
- }
-
- @Override
- public void deconstruct() { }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/TransformerFactoryProvider.java b/container-core/src/main/java/com/yahoo/container/xml/providers/TransformerFactoryProvider.java
deleted file mode 100644
index 851c4c1c51c..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/TransformerFactoryProvider.java
+++ /dev/null
@@ -1,25 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.container.di.componentgraph.Provider;
-
-import javax.xml.transform.TransformerFactory;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated Do not use!
- */
-@Deprecated // TODO: Remove on Vespa 8
-public class TransformerFactoryProvider implements Provider<TransformerFactory> {
-
- public static final String FACTORY_CLASS = "com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl";
-
- @Override
- public TransformerFactory get() {
- return TransformerFactory.newInstance(FACTORY_CLASS, this.getClass().getClassLoader());
- }
-
- @Override
- public void deconstruct() { }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/XMLEventFactoryProvider.java b/container-core/src/main/java/com/yahoo/container/xml/providers/XMLEventFactoryProvider.java
deleted file mode 100644
index 5039d47855d..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/XMLEventFactoryProvider.java
+++ /dev/null
@@ -1,27 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.container.di.componentgraph.Provider;
-
-import javax.xml.stream.XMLEventFactory;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated Do not use!
- */
-@Deprecated // TODO: Remove on Vespa 8
-public class XMLEventFactoryProvider implements Provider<XMLEventFactory> {
-
- public static final String FACTORY_CLASS = "com.sun.xml.internal.stream.events.XMLEventFactoryImpl";
-
- @Override
- public XMLEventFactory get() {
- System.setProperty("javax.xml.stream.XMLEventFactory", FACTORY_CLASS);
- // NOTE: In case the newFactory(String, ClassLoader) is used, XMLEventFactory treats the string as classname.
- return XMLEventFactory.newFactory();
- }
-
- @Override
- public void deconstruct() { }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/XMLInputFactoryProvider.java b/container-core/src/main/java/com/yahoo/container/xml/providers/XMLInputFactoryProvider.java
deleted file mode 100644
index 07a0f740d55..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/XMLInputFactoryProvider.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.container.di.componentgraph.Provider;
-
-import javax.xml.stream.XMLInputFactory;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated Do not use!
- */
-@Deprecated // TODO: Remove on Vespa 8
-public class XMLInputFactoryProvider implements Provider<XMLInputFactory> {
-
- private static final String INPUT_FACTORY_INTERFACE = XMLInputFactory.class.getName();
- public static final String FACTORY_CLASS = "com.sun.xml.internal.stream.XMLInputFactoryImpl";
-
- @Override
- @SuppressWarnings("deprecation")
- public XMLInputFactory get() {
- //ugly, but must be done
- System.setProperty(INPUT_FACTORY_INTERFACE, FACTORY_CLASS);
-
- // NOTE: In case the newFactory(String, ClassLoader) is used,
- // the given class loader is ignored if the system property is set!
- return XMLInputFactory.newFactory();
- }
-
- @Override
- public void deconstruct() { }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/XMLOutputFactoryProvider.java b/container-core/src/main/java/com/yahoo/container/xml/providers/XMLOutputFactoryProvider.java
deleted file mode 100644
index 50d10836938..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/XMLOutputFactoryProvider.java
+++ /dev/null
@@ -1,28 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.container.di.componentgraph.Provider;
-
-import javax.xml.stream.XMLOutputFactory;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated Do not use!
- */
-@Deprecated // TODO: Remove on Vespa 8
-public class XMLOutputFactoryProvider implements Provider<XMLOutputFactory> {
-
- public static final String FACTORY_CLASS = "com.sun.xml.internal.stream.XMLOutputFactoryImpl";
- @Override
- public XMLOutputFactory get() {
- System.setProperty("javax.xml.stream.XMLOutputFactory", FACTORY_CLASS);
-
- // NOTE: In case the newFactory(String, ClassLoader) is used, XMLOutputFactory treats the string as system
- // property name. Also, the given class loader is ignored if the property is set!
- return XMLOutputFactory.newFactory();
- }
-
- @Override
- public void deconstruct() { }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/XPathFactoryProvider.java b/container-core/src/main/java/com/yahoo/container/xml/providers/XPathFactoryProvider.java
deleted file mode 100644
index 429cf09b5ab..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/XPathFactoryProvider.java
+++ /dev/null
@@ -1,32 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.container.di.componentgraph.Provider;
-
-import javax.xml.xpath.XPathFactory;
-import javax.xml.xpath.XPathFactoryConfigurationException;
-
-/**
- * @author Einar M R Rosenvinge
- * @deprecated Do not use!
- */
-@Deprecated // TODO: Remove on Vespa 8
-public class XPathFactoryProvider implements Provider<XPathFactory> {
-
- public static final String FACTORY_CLASS = "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl";
-
- @Override
- public XPathFactory get() {
- try {
- return XPathFactory.newInstance(XPathFactory.DEFAULT_OBJECT_MODEL_URI,
- FACTORY_CLASS,
- this.getClass().getClassLoader());
- } catch (XPathFactoryConfigurationException e) {
- throw new IllegalStateException(e);
- }
- }
-
- @Override
- public void deconstruct() { }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/container/xml/providers/package-info.java b/container-core/src/main/java/com/yahoo/container/xml/providers/package-info.java
deleted file mode 100644
index d29f104910f..00000000000
--- a/container-core/src/main/java/com/yahoo/container/xml/providers/package-info.java
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-@ExportPackage
-package com.yahoo.container.xml.providers;
-
-import com.yahoo.osgi.annotation.ExportPackage;
diff --git a/container-core/src/main/java/com/yahoo/jdisc/http/Cookie.java b/container-core/src/main/java/com/yahoo/jdisc/http/Cookie.java
index c3f787882ec..b194124294c 100644
--- a/container-core/src/main/java/com/yahoo/jdisc/http/Cookie.java
+++ b/container-core/src/main/java/com/yahoo/jdisc/http/Cookie.java
@@ -215,11 +215,6 @@ public class Cookie {
.collect(toList());
}
- @Deprecated // TODO Vespa 8 Remove
- public static List<String> toSetCookieHeaderAll(Iterable<? extends Cookie> cookies) {
- return toSetCookieHeaders(cookies);
- }
-
public static Cookie fromSetCookieHeader(String headerVal) {
return java.net.HttpCookie.parse(headerVal).stream()
.map(httpCookie -> {
diff --git a/container-core/src/main/java/com/yahoo/jdisc/http/SecretStore.java b/container-core/src/main/java/com/yahoo/jdisc/http/SecretStore.java
deleted file mode 100644
index 30e3e770a00..00000000000
--- a/container-core/src/main/java/com/yahoo/jdisc/http/SecretStore.java
+++ /dev/null
@@ -1,23 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.jdisc.http;
-
-/**
- * An abstraction of a secret store for e.g passwords.
- * Implementations can be plugged in to provide passwords for various keys.
- *
- * @author bratseth
- * @author bjorncs
- * @deprecated Use com.yahoo.container.jdisc.secretstore.SecretStore
- */
-@Deprecated // Vespa 8
-public interface SecretStore {
-
- /** Returns the secret for this key */
- String getSecret(String key);
-
- /** Returns the secret for this key and version */
- default String getSecret(String key, int version) {
- throw new UnsupportedOperationException("SecretStore implementation does not support versioned secrets");
- }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterRequest.java b/container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterRequest.java
index a5d133b9eb4..cace3854973 100644
--- a/container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterRequest.java
+++ b/container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterRequest.java
@@ -65,17 +65,6 @@ public class DiscFilterRequest {
return parent.getUri();
}
- @Deprecated
- public void setUri(URI uri) { parent.setUri(uri); }
-
- /**
- * @deprecated Use methods on {@link DiscFilterRequest} instead to inspect request
- */
- @Deprecated(forRemoval = true, since = "7.511")
- public HttpRequest getParentRequest() {
- return parent;
- }
-
/**
* Returns the Internet Protocol (IP) address of the client
* or last proxy that sent the request.
@@ -341,14 +330,6 @@ public class DiscFilterRequest {
return getUri().getScheme();
}
- @Deprecated
- public void setScheme(String scheme, boolean isSecure) {
- String uri = getUri().toString();
- String arr [] = uri.split("://");
- URI newUri = URI.create(scheme + "://" + arr[1]);
- setUri(newUri);
- }
-
public String getServerName() {
return getUri().getHost();
}
diff --git a/container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterResponse.java b/container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterResponse.java
index af768a98d2d..e67677c4e7d 100644
--- a/container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterResponse.java
+++ b/container-core/src/main/java/com/yahoo/jdisc/http/filter/DiscFilterResponse.java
@@ -133,14 +133,6 @@ public class DiscFilterResponse {
parent.setStatus(status);
}
- /**
- * Return the parent HttpResponse
- *
- * @deprecated Use methods on {@link DiscFilterResponse} instead
- */
- @Deprecated(forRemoval = true, since = "7.511")
- public HttpResponse getParentResponse() { return (HttpResponse) parent; }
-
public void addCookie(JDiscCookieWrapper cookie) {
if(cookie != null) {
List<Cookie> cookies = new ArrayList<>();
diff --git a/container-core/src/main/java/com/yahoo/jdisc/http/filter/JdiscFilterRequest.java b/container-core/src/main/java/com/yahoo/jdisc/http/filter/JdiscFilterRequest.java
deleted file mode 100644
index 74c3b8adc7d..00000000000
--- a/container-core/src/main/java/com/yahoo/jdisc/http/filter/JdiscFilterRequest.java
+++ /dev/null
@@ -1,17 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.jdisc.http.filter;
-
-import com.yahoo.jdisc.http.HttpRequest;
-
-/**
- * JDisc implementation of a filter request.
- *
- */
-@Deprecated(forRemoval = true, since = "7.511")
-public class JdiscFilterRequest extends DiscFilterRequest {
-
- public JdiscFilterRequest(HttpRequest parent) {
- super(parent);
- }
-
-}
diff --git a/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/ConnectorFactory.java b/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/ConnectorFactory.java
index b56743954f4..7060a23111b 100644
--- a/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/ConnectorFactory.java
+++ b/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/ConnectorFactory.java
@@ -189,19 +189,9 @@ public class ConnectorFactory {
@SuppressWarnings("removal")
private SslContextFactory createSslContextFactory() {
- try {
- DefaultConnectorSsl ssl = new DefaultConnectorSsl();
- sslProvider.configureSsl(ssl, connectorConfig.name(), connectorConfig.listenPort());
- return ssl.createSslContextFactory();
- } catch (UnsupportedOperationException e) {
- // TODO(bjorncs) Vespa 8 Remove this compatibility workaround
- if (sslProvider instanceof SslContextFactoryProvider) {
- return ((SslContextFactoryProvider) sslProvider)
- .getInstance(connectorConfig.name(), connectorConfig.listenPort());
- } else {
- throw e;
- }
- }
+ DefaultConnectorSsl ssl = new DefaultConnectorSsl();
+ sslProvider.configureSsl(ssl, connectorConfig.name(), connectorConfig.listenPort());
+ return ssl.createSslContextFactory();
}
private ALPNServerConnectionFactory newAlpnConnectionFactory() {
diff --git a/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollector.java b/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollector.java
index 631f4080c7e..22c5b2ebfdb 100644
--- a/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollector.java
+++ b/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollector.java
@@ -317,9 +317,7 @@ class HttpResponseStatisticsCollector extends HandlerWrapper implements Graceful
@SuppressWarnings("removal")
private static Collection<String> metricNames(Request req) {
int code = req.getResponse().getStatus();
- if (code == 401) return Set.of(MetricDefinitions.RESPONSES_401, MetricDefinitions.RESPONSES_4XX);
- else if (code == 403) return Set.of(MetricDefinitions.RESPONSES_403, MetricDefinitions.RESPONSES_4XX);
- else if (code < 200) return Set.of(MetricDefinitions.RESPONSES_1XX);
+ if (code < 200) return Set.of(MetricDefinitions.RESPONSES_1XX);
else if (code < 300) return Set.of(MetricDefinitions.RESPONSES_2XX);
else if (code < 400) return Set.of(MetricDefinitions.RESPONSES_3XX);
else if (code < 500) return Set.of(MetricDefinitions.RESPONSES_4XX);
diff --git a/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/MetricDefinitions.java b/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/MetricDefinitions.java
index 686d23c4c99..29858644d56 100644
--- a/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/MetricDefinitions.java
+++ b/container-core/src/main/java/com/yahoo/jdisc/http/server/jetty/MetricDefinitions.java
@@ -50,8 +50,6 @@ class MetricDefinitions {
static final String RESPONSES_3XX = "http.status.3xx";
static final String RESPONSES_4XX = "http.status.4xx";
static final String RESPONSES_5XX = "http.status.5xx";
- @Deprecated(forRemoval = true, since = "7") static final String RESPONSES_401 = "http.status.401";
- @Deprecated(forRemoval = true, since = "7") static final String RESPONSES_403 = "http.status.403";
static final String STARTED_MILLIS = "serverStartedMillis";
diff --git a/container-core/src/main/java/com/yahoo/processing/Response.java b/container-core/src/main/java/com/yahoo/processing/Response.java
index cf54d043c5f..59533900a0c 100644
--- a/container-core/src/main/java/com/yahoo/processing/Response.java
+++ b/container-core/src/main/java/com/yahoo/processing/Response.java
@@ -1,9 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing;
-import com.google.common.util.concurrent.ListenableFuture;
import com.yahoo.component.provider.ListenableFreezableClass;
-import com.yahoo.concurrent.CompletableFutures;
import com.yahoo.concurrent.SystemTimer;
import com.yahoo.processing.execution.ResponseReceiver;
import com.yahoo.processing.impl.ProcessingFuture;
@@ -102,13 +100,6 @@ public class Response extends ListenableFreezableClass {
return new CompleteAllOnGetFuture<D>(futures);
}
- /** @deprecated Use {@link #recursiveFuture(DataList)} instead */
- @Deprecated(forRemoval = true, since = "7")
- @SuppressWarnings("removal")
- public static <D extends Data> ListenableFuture<DataList<D>> recursiveComplete(DataList<D> rootDataList) {
- return CompletableFutures.toGuavaListenableFuture(recursiveFuture(rootDataList));
- }
-
@SuppressWarnings("unchecked")
private static <D extends Data> void collectCompletionFutures(DataList<D> dataList, List<CompletableFuture<DataList<D>>> futures) {
futures.add(dataList.completeFuture());
diff --git a/container-core/src/main/java/com/yahoo/processing/impl/ProcessingFuture.java b/container-core/src/main/java/com/yahoo/processing/impl/ProcessingFuture.java
index ab597fffaff..07923de6e09 100644
--- a/container-core/src/main/java/com/yahoo/processing/impl/ProcessingFuture.java
+++ b/container-core/src/main/java/com/yahoo/processing/impl/ProcessingFuture.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.impl;
-import com.google.common.util.concurrent.ListenableFuture;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
@@ -14,8 +13,7 @@ import java.util.concurrent.TimeoutException;
*
* @author bjorncs
*/
-// TODO Vespa 8 remove ListenableFuture implementation
-public abstract class ProcessingFuture<V> extends CompletableFuture<V> implements ListenableFuture<V> {
+public abstract class ProcessingFuture<V> extends CompletableFuture<V> {
@Override public boolean cancel(boolean mayInterruptIfRunning) { return false; }
@Override public boolean isCancelled() { return false; }
@@ -23,7 +21,6 @@ public abstract class ProcessingFuture<V> extends CompletableFuture<V> implement
@Override public abstract V get() throws InterruptedException, ExecutionException;
@Override public abstract V get(long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException;
- @Override
public void addListener(Runnable listener, Executor executor) {
whenCompleteAsync((__, ___) -> listener.run(), executor);
}
diff --git a/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousSectionedRenderer.java b/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousSectionedRenderer.java
index bb5fe7a1f76..aa753beb6a7 100644
--- a/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousSectionedRenderer.java
+++ b/container-core/src/main/java/com/yahoo/processing/rendering/AsynchronousSectionedRenderer.java
@@ -1,8 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing.rendering;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.yahoo.concurrent.CompletableFutures;
import com.yahoo.concurrent.ThreadFactoryFactory;
import com.yahoo.jdisc.handler.CompletionHandler;
import com.yahoo.jdisc.handler.ContentChannel;
@@ -223,15 +221,6 @@ public abstract class AsynchronousSectionedRenderer<RESPONSE extends Response> e
return startRender(stream, response, execution, request);
}
-
- /** @deprecated Use {@link #renderResponseBeforeHandover(OutputStream, Response, Execution, Request)} */
- @Deprecated(forRemoval = true, since = "7")
- @SuppressWarnings("removal")
- public final ListenableFuture<Boolean> renderBeforeHandover(OutputStream stream, RESPONSE response,
- Execution execution, Request request) {
- return CompletableFutures.toGuavaListenableFuture(renderResponseBeforeHandover(stream, response, execution, request));
- }
-
private CompletableFuture<Boolean> startRender(OutputStream stream, RESPONSE response,
Execution execution, Request request) {
this.response = response;
diff --git a/container-core/src/main/java/com/yahoo/processing/rendering/Renderer.java b/container-core/src/main/java/com/yahoo/processing/rendering/Renderer.java
index 8db4ed4f624..df53ac846f2 100644
--- a/container-core/src/main/java/com/yahoo/processing/rendering/Renderer.java
+++ b/container-core/src/main/java/com/yahoo/processing/rendering/Renderer.java
@@ -1,9 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing.rendering;
-import com.google.common.util.concurrent.ListenableFuture;
import com.yahoo.component.AbstractComponent;
-import com.yahoo.concurrent.CompletableFutures;
import com.yahoo.processing.Request;
import com.yahoo.processing.Response;
import com.yahoo.processing.execution.Execution;
@@ -43,17 +41,6 @@ public abstract class Renderer<RESPONSE extends Response> extends AbstractCompon
}
/**
- * @deprecated Use/implement {@link #renderResponse(OutputStream, Response, Execution, Request)} instead.
- * Return type changed from {@link ListenableFuture} to {@link CompletableFuture}.
- */
- @Deprecated(forRemoval = true, since = "7")
- @SuppressWarnings("removal")
- public ListenableFuture<Boolean> render(OutputStream stream, RESPONSE response, Execution execution,
- Request request) {
- return CompletableFutures.toGuavaListenableFuture(renderResponse(stream, response, execution, request));
- }
-
- /**
* Render a response to a stream. The stream also exposes a ByteBuffer API
* for efficient transactions to JDisc. The returned future will throw the
* exception causing failure wrapped in an ExecutionException if rendering
@@ -65,11 +52,8 @@ public abstract class Renderer<RESPONSE extends Response> extends AbstractCompon
* @param request the request matching the response
* @return a {@link CompletableFuture} containing a boolean where true indicates a successful rendering
*/
- @SuppressWarnings("removal")
- public CompletableFuture<Boolean> renderResponse(OutputStream stream, RESPONSE response,
- Execution execution, Request request) {
- return CompletableFutures.toCompletableFuture(render(stream, response, execution, request));
- }
+ public abstract CompletableFuture<Boolean> renderResponse(OutputStream stream, RESPONSE response,
+ Execution execution, Request request);
/**
* Name of the output encoding, if applicable.
diff --git a/container-core/src/main/java/com/yahoo/processing/response/AbstractDataList.java b/container-core/src/main/java/com/yahoo/processing/response/AbstractDataList.java
index b1ce0643487..15b1abc10cd 100644
--- a/container-core/src/main/java/com/yahoo/processing/response/AbstractDataList.java
+++ b/container-core/src/main/java/com/yahoo/processing/response/AbstractDataList.java
@@ -1,9 +1,7 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing.response;
-import com.google.common.util.concurrent.ListenableFuture;
import com.yahoo.component.provider.ListenableFreezableClass;
-import com.yahoo.concurrent.CompletableFutures;
import com.yahoo.processing.Request;
import com.yahoo.processing.impl.ProcessingFuture;
@@ -92,13 +90,6 @@ public abstract class AbstractDataList<DATATYPE extends Data> extends Listenable
return incomingData;
}
- @Override
- @SuppressWarnings("removal")
- @Deprecated(forRemoval = true, since = "7")
- public ListenableFuture<DataList<DATATYPE>> complete() {
- return CompletableFutures.toGuavaListenableFuture(completedFuture);
- }
-
@Override public CompletableFuture<DataList<DATATYPE>> completeFuture() { return completedFuture; }
@Override
@@ -108,7 +99,7 @@ public abstract class AbstractDataList<DATATYPE extends Data> extends Listenable
public boolean isStreamed() { return streamed; }
public String toString() {
- return super.toString() + (complete().isDone() ? " [completed]" : " [incomplete, " + incoming() + "]");
+ return super.toString() + (completeFuture().isDone() ? " [completed]" : " [incomplete, " + incoming() + "]");
}
public static final class DrainOnGetFuture<DATATYPE extends Data> extends ProcessingFuture<DataList<DATATYPE>> {
diff --git a/container-core/src/main/java/com/yahoo/processing/response/DataList.java b/container-core/src/main/java/com/yahoo/processing/response/DataList.java
index dbda8983f12..8c63dd2f7fe 100644
--- a/container-core/src/main/java/com/yahoo/processing/response/DataList.java
+++ b/container-core/src/main/java/com/yahoo/processing/response/DataList.java
@@ -1,8 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing.response;
-import com.google.common.util.concurrent.ListenableFuture;
-
import java.util.List;
import java.util.concurrent.CompletableFuture;
@@ -74,10 +72,6 @@ public interface DataList<DATATYPE extends Data> extends Data {
*/
CompletableFuture<DataList<DATATYPE>> completeFuture();
- /** @deprecated Use {@link #completeFuture()} instead */
- @Deprecated(forRemoval = true, since = "7")
- ListenableFuture<DataList<DATATYPE>> complete();
-
/**
* Adds a listener which is invoked every time data is added to this list.
* The listener is always invoked on the same thread which is adding the data,
diff --git a/container-core/src/main/java/com/yahoo/processing/response/DefaultIncomingData.java b/container-core/src/main/java/com/yahoo/processing/response/DefaultIncomingData.java
index 813d6ac54d8..eab033f8bc9 100644
--- a/container-core/src/main/java/com/yahoo/processing/response/DefaultIncomingData.java
+++ b/container-core/src/main/java/com/yahoo/processing/response/DefaultIncomingData.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.response;
-import com.google.common.util.concurrent.ListenableFuture;
import com.yahoo.collections.Tuple2;
import com.yahoo.concurrent.CompletableFutures;
@@ -50,13 +49,6 @@ public class DefaultIncomingData<DATATYPE extends Data> implements IncomingData<
return owner;
}
- @Override
- @Deprecated(forRemoval = true, since = "7")
- @SuppressWarnings("removal")
- public ListenableFuture<DataList<DATATYPE>> completed() {
- return CompletableFutures.toGuavaListenableFuture(completionFuture);
- }
-
@Override public CompletableFuture<DataList<DATATYPE>> completedFuture() { return completionFuture; }
/** Returns whether the data in this is complete */
diff --git a/container-core/src/main/java/com/yahoo/processing/response/IncomingData.java b/container-core/src/main/java/com/yahoo/processing/response/IncomingData.java
index 54ba0fa8031..fc0e6d21e13 100644
--- a/container-core/src/main/java/com/yahoo/processing/response/IncomingData.java
+++ b/container-core/src/main/java/com/yahoo/processing/response/IncomingData.java
@@ -1,8 +1,6 @@
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.processing.response;
-import com.google.common.util.concurrent.ListenableFuture;
-import com.yahoo.concurrent.CompletableFutures;
import com.yahoo.processing.impl.ProcessingFuture;
import java.util.Collections;
@@ -39,10 +37,6 @@ public interface IncomingData<DATATYPE extends Data> {
*/
CompletableFuture<DataList<DATATYPE>> completedFuture();
- /** @deprecated Use {@link #completedFuture()} instead */
- @Deprecated(forRemoval = true, since = "7")
- ListenableFuture<DataList<DATATYPE>> completed();
-
/**
* Returns whether this is complete
*/
@@ -114,13 +108,6 @@ public interface IncomingData<DATATYPE extends Data> {
completionFuture = new ImmediateFuture<>(owner);
}
- @Override
- @SuppressWarnings("removal")
- @Deprecated(forRemoval = true, since = "7")
- public ListenableFuture<DataList<DATATYPE>> completed() {
- return CompletableFutures.toGuavaListenableFuture(completionFuture);
- }
-
@Override public CompletableFuture<DataList<DATATYPE>> completedFuture() { return completionFuture; }
@Override
diff --git a/container-core/src/main/java/org/json/package-info.java b/container-core/src/main/java/org/json/package-info.java
deleted file mode 100644
index bacf02a3adc..00000000000
--- a/container-core/src/main/java/org/json/package-info.java
+++ /dev/null
@@ -1,5 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-@ExportPackage
-package org.json;
-// TODO Vespa 8: stop providing org.json
-import com.yahoo.osgi.annotation.ExportPackage;
diff --git a/container-core/src/main/resources/configdefinitions/container.core.vip-status.def b/container-core/src/main/resources/configdefinitions/container.core.vip-status.def
index 61abda33302..44165bf14c3 100644
--- a/container-core/src/main/resources/configdefinitions/container.core.vip-status.def
+++ b/container-core/src/main/resources/configdefinitions/container.core.vip-status.def
@@ -8,5 +8,5 @@ accessdisk bool default=false
## If the path is relative vespa home is prepended
statusfile string default="share/qrsdocs/status.html"
-## Not used TODO: Remove on Vespa 8
+## Whether this container should be in rotation by default on startup
initiallyInRotation bool default=true
diff --git a/container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.connector.def b/container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.connector.def
index b4bd624c22f..ca02c245015 100644
--- a/container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.connector.def
+++ b/container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.connector.def
@@ -28,10 +28,6 @@ reuseAddress bool default=true
# The maximum idle time for a connection, which roughly translates to the Socket.setSoTimeout(int).
idleTimeout double default=180.0
-# DEPRECATED - Ignored, no longer in use
-stopTimeout double default = 30.0
-# TODO Vespa 8 Remove stop timeout
-
# Whether or not to have socket keep alive turned on.
tcpKeepAliveEnabled bool default=false
diff --git a/container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.server.def b/container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.server.def
index aed92b1459f..f34fd523207 100644
--- a/container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.server.def
+++ b/container-core/src/main/resources/configdefinitions/jdisc.http.jdisc.http.server.def
@@ -7,17 +7,6 @@ developerMode bool default=false
# The gzip compression level to use, if compression is enabled in a request.
responseCompressionLevel int default=6
-# DEPRECATED - Ignored, no longer in use.
-httpKeepAliveEnabled bool default=true
-# TODO Vespa 8 Remove httpKeepAliveEnabled
-
-# Maximum number of request per http connection before server will hangup.
-# Naming taken from apache http server.
-# 0 means never hangup.
-# DEPRECATED - Ignored, no longer in use. Use similar parameter in connector config instead.
-maxKeepAliveRequests int default=0
-# TODO Vespa 8 Remove maxKeepAliveRequests
-
# Whether the request body of POSTed forms should be removed (form parameters are available as request parameters).
removeRawPostBodyForWwwUrlEncodedPost bool default=false
diff --git a/container-core/src/main/resources/configdefinitions/metrics.metrics-presentation.def b/container-core/src/main/resources/configdefinitions/metrics.metrics-presentation.def
deleted file mode 100644
index 2e537a00342..00000000000
--- a/container-core/src/main/resources/configdefinitions/metrics.metrics-presentation.def
+++ /dev/null
@@ -1,6 +0,0 @@
-# Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
-namespace=metrics
-
-## TODO Vespa 8: remove
-slidingwindow bool default=true
diff --git a/container-core/src/test/java/com/yahoo/container/di/DirConfigSource.java b/container-core/src/test/java/com/yahoo/container/di/DirConfigSource.java
index 34119163d2f..d459070e2bd 100644
--- a/container-core/src/test/java/com/yahoo/container/di/DirConfigSource.java
+++ b/container-core/src/test/java/com/yahoo/container/di/DirConfigSource.java
@@ -16,7 +16,6 @@ import java.util.Random;
* @author gjoranv
* @author ollivir
*/
-@SuppressWarnings("removal") // TODO Vespa 8: remove
public class DirConfigSource {
private final TemporaryFolder tempFolder = createTemporaryFolder();
public final ConfigSource configSource;
diff --git a/container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTestBase.java b/container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTestBase.java
index 58263548085..b87a1179832 100644
--- a/container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTestBase.java
+++ b/container-core/src/test/java/com/yahoo/container/jdisc/state/StateHandlerTestBase.java
@@ -9,7 +9,6 @@ import com.yahoo.container.core.ApplicationMetadataConfig;
import com.yahoo.container.jdisc.RequestHandlerTestDriver;
import com.yahoo.container.jdisc.config.HealthMonitorConfig;
import com.yahoo.jdisc.Timer;
-import com.yahoo.metrics.MetricsPresentationConfig;
import org.junit.Before;
import org.junit.BeforeClass;
diff --git a/container-core/src/test/java/com/yahoo/container/xml/providers/XMLProviderTest.java b/container-core/src/test/java/com/yahoo/container/xml/providers/XMLProviderTest.java
deleted file mode 100644
index e9983341507..00000000000
--- a/container-core/src/test/java/com/yahoo/container/xml/providers/XMLProviderTest.java
+++ /dev/null
@@ -1,84 +0,0 @@
-// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-package com.yahoo.container.xml.providers;
-
-import org.junit.Test;
-
-import javax.xml.datatype.DatatypeFactory;
-import javax.xml.parsers.DocumentBuilderFactory;
-import javax.xml.parsers.SAXParserFactory;
-import javax.xml.stream.XMLEventFactory;
-import javax.xml.stream.XMLInputFactory;
-import javax.xml.stream.XMLOutputFactory;
-import javax.xml.transform.TransformerFactory;
-import javax.xml.validation.SchemaFactory;
-import javax.xml.xpath.XPathFactory;
-
-import static org.hamcrest.CoreMatchers.equalTo;
-import static org.junit.Assert.assertThat;
-
-/**
- * @author <a href="mailto:einarmr@yahoo-inc.com">Einar M R Rosenvinge</a>
- * @since 5.1.29
- */
-@SuppressWarnings("deprecation")
-public class XMLProviderTest {
-
- @Test
- public void testInstantiationAndDestruction() {
- {
- DatatypeFactoryProvider provider = new DatatypeFactoryProvider();
- DatatypeFactory factory = provider.get();
- assertThat(factory.getClass().getName(), equalTo(DatatypeFactoryProvider.FACTORY_CLASS));
- provider.deconstruct();
- }
- {
- DocumentBuilderFactoryProvider provider = new DocumentBuilderFactoryProvider();
- DocumentBuilderFactory factory = provider.get();
- assertThat(factory.getClass().getName(), equalTo(DocumentBuilderFactoryProvider.FACTORY_CLASS));
- provider.deconstruct();
- }
- {
- SAXParserFactoryProvider provider = new SAXParserFactoryProvider();
- SAXParserFactory factory = provider.get();
- assertThat(factory.getClass().getName(), equalTo(SAXParserFactoryProvider.FACTORY_CLASS));
- provider.deconstruct();
- }
- {
- SchemaFactoryProvider provider = new SchemaFactoryProvider();
- SchemaFactory factory = provider.get();
- assertThat(factory.getClass().getName(), equalTo(SchemaFactoryProvider.FACTORY_CLASS));
- provider.deconstruct();
- }
- {
- TransformerFactoryProvider provider = new TransformerFactoryProvider();
- TransformerFactory factory = provider.get();
- assertThat(factory.getClass().getName(), equalTo(TransformerFactoryProvider.FACTORY_CLASS));
- provider.deconstruct();
- }
- {
- XMLEventFactoryProvider provider = new XMLEventFactoryProvider();
- XMLEventFactory factory = provider.get();
- assertThat(factory.getClass().getName(), equalTo(XMLEventFactoryProvider.FACTORY_CLASS));
- provider.deconstruct();
- }
- {
- XMLInputFactoryProvider provider = new XMLInputFactoryProvider();
- XMLInputFactory factory = provider.get();
- assertThat(factory.getClass().getName(), equalTo(XMLInputFactoryProvider.FACTORY_CLASS));
- provider.deconstruct();
- }
- {
- XMLOutputFactoryProvider provider = new XMLOutputFactoryProvider();
- XMLOutputFactory factory = provider.get();
- assertThat(factory.getClass().getName(), equalTo(XMLOutputFactoryProvider.FACTORY_CLASS));
- provider.deconstruct();
- }
- {
- XPathFactoryProvider provider = new XPathFactoryProvider();
- XPathFactory factory = provider.get();
- assertThat(factory.getClass().getName(), equalTo(XPathFactoryProvider.FACTORY_CLASS));
- provider.deconstruct();
- }
- }
-
-}
diff --git a/container-core/src/test/java/com/yahoo/jdisc/http/HttpRequestTestCase.java b/container-core/src/test/java/com/yahoo/jdisc/http/HttpRequestTestCase.java
index fd0cfe5718c..7f9e1e8bd64 100644
--- a/container-core/src/test/java/com/yahoo/jdisc/http/HttpRequestTestCase.java
+++ b/container-core/src/test/java/com/yahoo/jdisc/http/HttpRequestTestCase.java
@@ -73,15 +73,12 @@ public class HttpRequestTestCase {
}
@Test
- @SuppressWarnings("deprecation")
public void requireThatAccessorsWork() {
URI uri = URI.create("http://localhost/path?foo=bar&foo=baz&cox=69");
InetSocketAddress address = new InetSocketAddress("remotehost", 69);
final HttpRequest request = HttpRequest.newServerRequest(mockContainer(), uri, HttpRequest.Method.GET,
HttpRequest.Version.HTTP_1_1, address, 1L);
assertEquals(uri, request.getUri());
- request.setUri(uri = URI.create("http://remotehost/"));
- assertEquals(uri, request.getUri());
assertEquals(HttpRequest.Method.GET, request.getMethod());
request.setMethod(HttpRequest.Method.CONNECT);
diff --git a/container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterRequestTest.java b/container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterRequestTest.java
index 25efe4ac5f6..294e19aa2a1 100644
--- a/container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterRequestTest.java
+++ b/container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterRequestTest.java
@@ -262,41 +262,36 @@ public class DiscFilterRequestTest {
}
@Test
- @SuppressWarnings("deprecation")
- public void testSetScheme() {
- URI uri = URI.create("https://example.yahoo.com:8080/test");
- HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
- DiscFilterRequest request = new DiscFilterRequest(httpReq);
-
- request.setScheme("http", true);
- System.out.println(request.getUri().toString());
- Assert.assertEquals(request.getUri().toString(), "http://example.yahoo.com:8080/test");
- }
-
- @Test
- @SuppressWarnings("deprecation")
public void testGetServerPort() {
- URI uri = URI.create("http://example.yahoo.com/test");
- HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
- DiscFilterRequest request = new DiscFilterRequest(httpReq);
- Assert.assertEquals(request.getServerPort(), 80);
-
- request.setUri(URI.create("https://example.yahoo.com/test"));
- Assert.assertEquals(request.getServerPort(), 443);
-
+ {
+ URI uri = URI.create("http://example.yahoo.com/test");
+ HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
+ DiscFilterRequest request = new DiscFilterRequest(httpReq);
+ Assert.assertEquals(request.getServerPort(), 80);
+
+ }
+ {
+ URI uri = URI.create("https://example.yahoo.com/test");
+ HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
+ DiscFilterRequest request = new DiscFilterRequest(httpReq);
+ Assert.assertEquals(request.getServerPort(), 443);
+ }
}
@Test
- @SuppressWarnings("deprecation")
public void testIsSecure() {
- URI uri = URI.create("http://example.yahoo.com/test");
- HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
- DiscFilterRequest request = new DiscFilterRequest(httpReq);
- Assert.assertFalse(request.isSecure());
-
- request.setUri(URI.create("https://example.yahoo.com/test"));
- Assert.assertTrue(request.isSecure());
-
+ {
+ URI uri = URI.create("http://example.yahoo.com/test");
+ HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
+ DiscFilterRequest request = new DiscFilterRequest(httpReq);
+ Assert.assertFalse(request.isSecure());
+ }
+ {
+ URI uri = URI.create("https://example.yahoo.com/test");
+ HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
+ DiscFilterRequest request = new DiscFilterRequest(httpReq);
+ Assert.assertTrue(request.isSecure());
+ }
}
@Test
diff --git a/container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterResponseTest.java b/container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterResponseTest.java
index bbb81ae3308..ace41473eb4 100644
--- a/container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterResponseTest.java
+++ b/container-core/src/test/java/com/yahoo/jdisc/http/filter/DiscFilterResponseTest.java
@@ -101,14 +101,4 @@ public class DiscFilterResponseTest {
Assert.assertEquals(response.getHeader("name"), "value");
}
- @Test
- @SuppressWarnings("removal")
- public void testGetParentResponse() {
- URI uri = URI.create("http://example.com/test");
- HttpRequest httpReq = newRequest(uri, HttpRequest.Method.GET, HttpRequest.Version.HTTP_1_1);
- HttpResponse httpResp = newResponse(httpReq, 200);
- DiscFilterResponse response = new DiscFilterResponse(httpResp);
- Assert.assertSame(response.getParentResponse(), httpResp);
- }
-
}
diff --git a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java
index 231a9f1384a..89908e6d56b 100644
--- a/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java
+++ b/container-core/src/test/java/com/yahoo/jdisc/http/server/jetty/HttpResponseStatisticsCollectorTest.java
@@ -86,8 +86,6 @@ public class HttpResponseStatisticsCollectorTest {
assertStatisticsEntry(stats, "http", "GET", MetricDefinitions.RESPONSES_4XX, "read", 401, 1L);
assertStatisticsEntry(stats, "http", "GET", MetricDefinitions.RESPONSES_4XX, "read", 403, 1L);
assertStatisticsEntry(stats, "http", "GET", MetricDefinitions.RESPONSES_4XX, "read", 404, 1L);
- assertStatisticsEntry(stats, "http", "GET", MetricDefinitions.RESPONSES_401, "read", 401, 1L);
- assertStatisticsEntry(stats, "http", "GET", MetricDefinitions.RESPONSES_403, "read", 403, 1L);
}
diff --git a/container-core/src/test/java/com/yahoo/processing/ResponseTestCase.java b/container-core/src/test/java/com/yahoo/processing/ResponseTestCase.java
index efcf608b6f0..f8cd646909d 100644
--- a/container-core/src/test/java/com/yahoo/processing/ResponseTestCase.java
+++ b/container-core/src/test/java/com/yahoo/processing/ResponseTestCase.java
@@ -22,7 +22,7 @@ public class ResponseTestCase {
* Check the recursive toString printing along the way.
* List variable names ends by numbers specifying the index of the list at each level.
*/
- @SuppressWarnings({"unchecked", "removal"})
+ @SuppressWarnings({"unchecked"})
@Test
public void testRecursiveCompletionAndToString() throws InterruptedException, ExecutionException {
// create lists
@@ -68,7 +68,7 @@ public class ResponseTestCase {
assertEqualsIgnoreObjectNumbers("Uncompleted tree, incoming complete", uncompletedTreeCompletedIncoming, Responses.recursiveToString(list1));
// complete all
- Response.recursiveComplete(list1).get();
+ Response.recursiveFuture(list1).get();
assertEqualsIgnoreObjectNumbers("Completed tree", completedTree, Responses.recursiveToString(list1));
}
diff --git a/container-core/src/test/java/com/yahoo/processing/execution/test/FutureDataTestCase.java b/container-core/src/test/java/com/yahoo/processing/execution/test/FutureDataTestCase.java
index 2fb32271419..7dd043383a1 100644
--- a/container-core/src/test/java/com/yahoo/processing/execution/test/FutureDataTestCase.java
+++ b/container-core/src/test/java/com/yahoo/processing/execution/test/FutureDataTestCase.java
@@ -25,7 +25,7 @@ import static org.junit.Assert.assertEquals;
public class FutureDataTestCase {
/** Run a chain which ends in a processor which returns a response containing future data. */
- @SuppressWarnings({"unchecked", "removal"})
+ @SuppressWarnings({"unchecked"})
@Test
public void testFutureDataPassThrough() throws InterruptedException, ExecutionException, TimeoutException {
// Set up
@@ -45,14 +45,14 @@ public class FutureDataTestCase {
futureDataSource.incomingData.get(0).add(new StringData(request, "d1"));
futureDataSource.incomingData.get(0).addLast(new StringData(request, "d2"));
assertEquals("New data is not visible because we haven't asked for it", 1, response.data().asList().size());
- response.data().complete().get(1000, TimeUnit.MILLISECONDS);
+ response.data().completeFuture().get(1000, TimeUnit.MILLISECONDS);
assertEquals("Now the data is available", 3, response.data().asList().size());
assertEquals("d1",response.data().get(1).toString().toString());
assertEquals("d2",response.data().get(2).toString().toString());
}
/** Federate to one source which returns data immediately and one who return future data */
- @SuppressWarnings({"unchecked", "removal"})
+ @SuppressWarnings({"unchecked"})
@Test
public void testFederateSyncAndAsyncData() throws InterruptedException, ExecutionException, TimeoutException {
// Set up
@@ -81,7 +81,7 @@ public class FutureDataTestCase {
futureDataSource.incomingData.get(0).add(new StringData(request, "d1"));
futureDataSource.incomingData.get(0).addLast(new StringData(request, "d2"));
assertEquals("New data is not visible because we haven't asked for it", 0, asyncData.asList().size());
- asyncData.complete().get(1000, TimeUnit.MILLISECONDS);
+ asyncData.completeFuture().get(1000, TimeUnit.MILLISECONDS);
assertEquals("Now the data is available", 2, asyncData.asList().size());
assertEquals("d1",asyncData.get(0).toString().toString());
assertEquals("d2", asyncData.get(1).toString().toString());
@@ -108,7 +108,7 @@ public class FutureDataTestCase {
assertEquals("New data is not visible because it is not complete", 0, response.data().asList().size());
futureDataSource.incomingData.get(0).addLast(new StringData(request, "d2"));
assertEquals("Not visible because it has not been synced yet", 0, response.data().asList().size());
- response.data().complete().get(1000, TimeUnit.MILLISECONDS);
+ response.data().completeFuture().get(1000, TimeUnit.MILLISECONDS);
assertEquals("Now the data as well as the count is available", 3, response.data().asList().size());
assertEquals("d1",response.data().get(0).toString().toString());
assertEquals("d2",response.data().get(1).toString().toString());
@@ -120,7 +120,7 @@ public class FutureDataTestCase {
* When the first of the futures are done one additional chain is to be run.
* When both are done another chain is to be run.
*/
- @SuppressWarnings({"unchecked", "removal"})
+ @SuppressWarnings({"unchecked"})
@Test
public void testAsyncDataProcessingOfFederatedResult() throws InterruptedException, ExecutionException, TimeoutException {
// Set up
@@ -154,7 +154,7 @@ public class FutureDataTestCase {
// complete async data in source1
futureSource1.incomingData.get(0).addLast(new StringData(request,"source1Data"));
assertEquals("Not visible yet", 0, source1Data.asList().size());
- source1Data.complete().get(1000, TimeUnit.MILLISECONDS);
+ source1Data.completeFuture().get(1000, TimeUnit.MILLISECONDS);
assertEquals(2, source1Data.asList().size());
assertEquals("source1Data",source1Data.get(0).toString());
assertEquals("Completion listener chain on this has run", "[source1] Data count: 1", source1Data.get(1).toString());
@@ -164,7 +164,7 @@ public class FutureDataTestCase {
futureSource2.incomingData.get(0).addLast(new StringData(request, "source2Data"));
assertEquals("Main completion listener has not run", 3, response.data().asList().size());
- Response.recursiveComplete(response.data()).get();
+ Response.recursiveFuture(response.data()).get();
assertEquals("Main completion listener has run", 4, response.data().asList().size());
assertEquals("The main data counter saw all sync data, but not source2 data as it executes after this",
"[main] Data count: " + (2 + 0 + 3), response.data().get(3).toString());
diff --git a/container-core/src/test/java/com/yahoo/processing/execution/test/StreamingTestCase.java b/container-core/src/test/java/com/yahoo/processing/execution/test/StreamingTestCase.java
index bd1307ff77c..d494e774f8e 100644
--- a/container-core/src/test/java/com/yahoo/processing/execution/test/StreamingTestCase.java
+++ b/container-core/src/test/java/com/yahoo/processing/execution/test/StreamingTestCase.java
@@ -26,7 +26,7 @@ import static org.junit.Assert.assertEquals;
public class StreamingTestCase {
/** Tests adding a chain which is called every time new data is added to a data list */
- @SuppressWarnings({"unchecked", "removal"})
+ @SuppressWarnings({"unchecked"})
@Test
public void testStreamingData() throws InterruptedException, ExecutionException, TimeoutException {
// Set up
@@ -66,7 +66,7 @@ public class StreamingTestCase {
assertEquals("We are getting data add events also the last time", 4, streamProcessor.invocationCount);
assertEquals("New data is consumed", 4, response.data().asList().size());
- response.data().complete().get(1000, TimeUnit.MILLISECONDS); // no-op here
+ response.data().completeFuture().get(1000, TimeUnit.MILLISECONDS); // no-op here
assertEquals("d1",response.data().get(1).toString().toString());
assertEquals("d2",response.data().get(2).toString().toString());
assertEquals("d3",response.data().get(3).toString().toString());
diff --git a/container-core/src/test/java/com/yahoo/processing/rendering/AsynchronousSectionedRendererTest.java b/container-core/src/test/java/com/yahoo/processing/rendering/AsynchronousSectionedRendererTest.java
index a6db21d5094..5dfe29dd4a1 100644
--- a/container-core/src/test/java/com/yahoo/processing/rendering/AsynchronousSectionedRendererTest.java
+++ b/container-core/src/test/java/com/yahoo/processing/rendering/AsynchronousSectionedRendererTest.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.rendering;
-import com.google.common.util.concurrent.ListenableFuture;
import com.yahoo.component.provider.ListenableFreezableClass;
import com.yahoo.container.jdisc.ContentChannelOutputStream;
import com.yahoo.processing.Processor;
@@ -23,8 +22,6 @@ import java.nio.charset.Charset;
import java.util.ArrayList;
import java.util.List;
import java.util.concurrent.CompletableFuture;
-import java.util.concurrent.Executor;
-import java.util.concurrent.TimeUnit;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotSame;
@@ -403,41 +400,6 @@ public class AsynchronousSectionedRendererTest {
}
@Override
- @SuppressWarnings("removal")
- public ListenableFuture<DataList<StringData>> complete() {
- return new ListenableFuture<>() {
- @Override
- public void addListener(Runnable runnable, Executor executor) {
- }
-
- @Override
- public boolean cancel(boolean b) {
- return false;
- }
-
- @Override
- public boolean isCancelled() {
- return false;
- }
-
- @Override
- public boolean isDone() {
- return true;
- }
-
- @Override
- public DataList<StringData> get() {
- return StringDataList.this;
- }
-
- @Override
- public DataList<StringData> get(long l, TimeUnit timeUnit) {
- return StringDataList.this;
- }
- };
- }
-
- @Override
public CompletableFuture<DataList<StringData>> completeFuture() {
return CompletableFuture.completedFuture(this);
}
diff --git a/container-core/src/test/java/com/yahoo/processing/test/documentation/AsyncDataProcessingInitiator.java b/container-core/src/test/java/com/yahoo/processing/test/documentation/AsyncDataProcessingInitiator.java
index 21731f7d714..a2a028772e5 100644
--- a/container-core/src/test/java/com/yahoo/processing/test/documentation/AsyncDataProcessingInitiator.java
+++ b/container-core/src/test/java/com/yahoo/processing/test/documentation/AsyncDataProcessingInitiator.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.test.documentation;
-import com.google.common.util.concurrent.MoreExecutors;
import com.yahoo.component.chain.Chain;
import com.yahoo.processing.Processor;
import com.yahoo.processing.Request;
@@ -22,13 +21,11 @@ public class AsyncDataProcessingInitiator extends Processor {
this.asyncChain=asyncChain;
}
- @SuppressWarnings({"removal"})
@Override
public Response process(Request request, Execution execution) {
Response response=execution.process(request);
- response.data().complete().addListener(new RunnableExecution(request,
- new ExecutionWithResponse(asyncChain, response, execution)),
- MoreExecutors.directExecutor());
+ response.data().completeFuture().whenComplete((__, ___) -> new RunnableExecution(request,
+ new ExecutionWithResponse(asyncChain, response, execution)).run());
return response;
}