Skip to content

Commit

Permalink
Add some missing nullable annotations.
Browse files Browse the repository at this point in the history
  • Loading branch information
JakeWharton committed May 25, 2017
1 parent 9168d0d commit 395f1a7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
import java.lang.reflect.Proxy;
import java.lang.reflect.Type;
import java.util.concurrent.ExecutorService;
import javax.annotation.Nullable;
import retrofit2.Call;
import retrofit2.CallAdapter;
import retrofit2.Retrofit;
Expand All @@ -46,7 +47,7 @@ public final class BehaviorDelegate<T> {
this.service = service;
}

public T returningResponse(Object response) {
public T returningResponse(@Nullable Object response) {
return returning(Calls.response(response));
}

Expand Down
2 changes: 1 addition & 1 deletion retrofit-mock/src/main/java/retrofit2/mock/Calls.java
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ public static <T> Call<T> defer(Callable<Call<T>> callable) {
return new DeferredCall<>(callable);
}

public static <T> Call<T> response(T successValue) {
public static <T> Call<T> response(@Nullable T successValue) {
return new FakeCall<>(Response.success(successValue), null);
}

Expand Down

0 comments on commit 395f1a7

Please sign in to comment.