Skip to content

Commit

Permalink
Fix google#949 - eclipse JDT compilation fails.
Browse files Browse the repository at this point in the history
  • Loading branch information
facboy committed Nov 17, 2017
1 parent 5f11c87 commit a55fed9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions java/dagger/internal/DoubleCheck.java
Expand Up @@ -65,7 +65,7 @@ public T get() {
}

/** Returns a {@link Provider} that caches the value from the given delegate provider. */
public static <T> Provider<T> provider(Provider<T> delegate) {
public static <P extends Provider<T>, T> Provider<T> provider(P 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
Expand All @@ -76,7 +76,7 @@ public static <T> Provider<T> provider(Provider<T> delegate) {
}

/** Returns a {@link Lazy} that caches the value from the given provider. */
public static <T> Lazy<T> lazy(Provider<T> provider) {
public static <P extends Provider<T>, T> Lazy<T> lazy(P provider) {
if (provider instanceof Lazy) {
@SuppressWarnings("unchecked")
final Lazy<T> lazy = (Lazy<T>) provider;
Expand Down

0 comments on commit a55fed9

Please sign in to comment.