summaryrefslogtreecommitdiffstats
path: root/jdisc_core/src/main/java/com
diff options
context:
space:
mode:
Diffstat (limited to 'jdisc_core/src/main/java/com')
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/Container.java4
-rw-r--r--jdisc_core/src/main/java/com/yahoo/jdisc/core/ContainerSnapshot.java3
2 files changed, 6 insertions, 1 deletions
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 f3ed16c65e7..e96f7f08fe8 100644
--- a/jdisc_core/src/main/java/com/yahoo/jdisc/Container.java
+++ b/jdisc_core/src/main/java/com/yahoo/jdisc/Container.java
@@ -49,8 +49,10 @@ public interface Container extends SharedResource, Timer {
* @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.
*/
- <T> T getInstance(Key<T> key);
+ @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
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 f3641f2475b..808c8e89b1b 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
@@ -37,7 +37,10 @@ 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);
}