summaryrefslogtreecommitdiffstats
path: root/jdisc_core
diff options
context:
space:
mode:
authorBjørn Christian Seime <bjorncs@verizonmedia.com>2022-05-05 12:44:27 +0200
committergjoranv <gv@verizonmedia.com>2022-06-08 11:45:21 +0200
commite70380aaa5890d9d3a4c83630f0e49b82093bfc4 (patch)
tree6983c429696daa2618d77a3e40f31c422903b85a /jdisc_core
parenta0c93b2790c150509659182328f5b7d2be0d9756 (diff)
Remove deprecated APIs exposing Guava types
Diffstat (limited to 'jdisc_core')
-rw-r--r--jdisc_core/abi-spec.json1
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/Container.java15
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/core/ContainerSnapshot.java9
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentOutputStream.java2
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentWriter.java2
5 files changed, 2 insertions, 27 deletions
diff --git a/jdisc_core/abi-spec.json b/jdisc_core/abi-spec.json
index 06e76f88898..d43c3e03e8f 100644
--- a/jdisc_core/abi-spec.json
+++ b/jdisc_core/abi-spec.json
@@ -32,7 +32,6 @@
],
"methods": [
"public abstract com.yahoo.jdisc.handler.RequestHandler resolveHandler(com.yahoo.jdisc.Request)",
- "public java.lang.Object getInstance(com.google.inject.Key)",
"public abstract java.lang.Object getInstance(java.lang.Class)"
],
"fields": []
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/Container.java b/jdisc_core/src/main/java/com/yahoo/jdisc/Container.java
index e96f7f08fe8..b6deda58226 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/Container.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/Container.java
@@ -2,7 +2,6 @@
package com.yahoo.jdisc;
import com.google.inject.ConfigurationException;
-import com.google.inject.Key;
import com.google.inject.ProvisionException;
import com.yahoo.jdisc.application.Application;
import com.yahoo.jdisc.application.BindingSet;
@@ -41,20 +40,6 @@ public interface Container extends SharedResource, Timer {
RequestHandler resolveHandler(Request request);
/**
- * Returns the appropriate instance for the given injection key. When feasible, avoid using this method in favor
- * of having Guice inject your dependencies ahead of time.
- *
- * @param key The key of the instance to return.
- * @param <T> The class of the instance to return.
- * @return The appropriate instance of the given class.
- * @throws ConfigurationException If this injector cannot find or create the provider.
- * @throws ProvisionException If there was a runtime failure while providing an instance.
- * @deprecated Use {@link #getInstance(Class)} instead.
- */
- @Deprecated(forRemoval = true, since = "7") // TODO Vespa 8 remove
- default <T> T getInstance(Key<T> key) { throw new UnsupportedOperationException(); }
-
- /**
* Returns the appropriate instance for the given injection type. When feasible, avoid using this method in
* favor of having Guice inject your dependencies ahead of time.
*
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/core/ContainerSnapshot.java b/jdisc_core/src/main/java/com/yahoo/jdisc/core/ContainerSnapshot.java
index 808c8e89b1b..8367ea13a1a 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/core/ContainerSnapshot.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/core/ContainerSnapshot.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.jdisc.core;
-import com.google.inject.Key;
import com.yahoo.jdisc.AbstractResource;
import com.yahoo.jdisc.Container;
import com.yahoo.jdisc.Request;
@@ -37,14 +36,6 @@ class ContainerSnapshot extends AbstractResource implements Container {
this.containerReference = container.refer(context);
}
- /** @deprecated Use {@link #getInstance(Class)} instead. */
- @Override
- @Deprecated(forRemoval = true, since = "7") // TODO Vespa 8 remove
- @SuppressWarnings("removal")
- public <T> T getInstance(Key<T> key) {
- return container.guiceInjector().getInstance(key);
- }
-
@Override
public <T> T getInstance(Class<T> type) {
return container.guiceInjector().getInstance(type);
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentOutputStream.java b/jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentOutputStream.java
index e001db2ab81..e344dc6a159 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentOutputStream.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentOutputStream.java
@@ -12,7 +12,7 @@ import java.util.concurrent.TimeoutException;
/**
* <p>This class extends the {@link AbstractContentOutputStream}, and forwards all write() and close() calls to a {@link
* FastContentWriter}. This means that once {@link #close()} has been called, the asynchronous completion of all pending
- * operations can be awaited using the ListenableFuture interface of this class. Any asynchronous failure will be
+ * operations can be awaited using the {@link Future} interface of this class. Any asynchronous failure will be
* rethrown when calling either of the get() methods on this class.</p>
* <p>Please notice that the Future implementation of this class will NEVER complete unless {@link #close()} has been
* called.</p>
diff --git a/jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentWriter.java b/jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentWriter.java
index 7c278c67d59..fefd2ee6ee7 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentWriter.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/handler/FastContentWriter.java
@@ -11,7 +11,7 @@ import java.util.concurrent.atomic.AtomicInteger;
/**
* <p>This class provides a non-blocking, awaitable <em>write</em>-interface to a {@link ContentChannel}.
- * The ListenableFuture&lt;Boolean&gt; interface can be used to await
+ * The {@link CompletableFuture<Boolean>} interface can be used to await
* the asynchronous completion of all pending operations. Any asynchronous
* failure will be rethrown when calling either of the get() methods on
* this class.</p>