From c44ddb597992fd0a7addb3eff0e17cc95f027f47 Mon Sep 17 00:00:00 2001 From: Dagger Team Date: Tue, 5 Nov 2024 22:45:43 -0800 Subject: [PATCH] Clean up old eclipse workaround that should be resolved as of Eclipse 4.7 as per https://bugs.eclipse.org/bugs/show_bug.cgi?id=517710 RELNOTES=N/A PiperOrigin-RevId: 693597625 --- java/dagger/internal/DoubleCheck.java | 5 +---- java/dagger/internal/SingleCheck.java | 4 +--- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/java/dagger/internal/DoubleCheck.java b/java/dagger/internal/DoubleCheck.java index bd95068ff60..6f5f046d1da 100644 --- a/java/dagger/internal/DoubleCheck.java +++ b/java/dagger/internal/DoubleCheck.java @@ -77,10 +77,7 @@ public T get() { } /** Returns a {@link Provider} that caches the value from the given delegate provider. */ - // This method is declared this way instead of " Provider provider(Provider delegate)" - // to work around an Eclipse type inference bug: https://github.com/google/dagger/issues/949. - public static

, T> dagger.internal.Provider provider( - P delegate) { + public static dagger.internal.Provider provider(dagger.internal.Provider delegate) { checkNotNull(delegate); if (delegate instanceof DoubleCheck) { /* This should be a rare case, but if we have a scoped @Binds that delegates to a scoped diff --git a/java/dagger/internal/SingleCheck.java b/java/dagger/internal/SingleCheck.java index 712a269628d..0b0273f5e3f 100644 --- a/java/dagger/internal/SingleCheck.java +++ b/java/dagger/internal/SingleCheck.java @@ -59,9 +59,7 @@ public T get() { } /** Returns a {@link Provider} that caches the value from the given delegate provider. */ - // This method is declared this way instead of " Provider provider(Provider provider)" - // to work around an Eclipse type inference bug: https://github.com/google/dagger/issues/949. - public static

, T> Provider provider(P provider) { + public static Provider provider(Provider provider) { // If a scoped @Binds delegates to a scoped binding, don't cache the value again. if (provider instanceof SingleCheck || provider instanceof DoubleCheck) { return provider;