Skip to content

Commit

Permalink
Merge pull request #2961 from square/jakew/nullability/2018-11-16
Browse files Browse the repository at this point in the history
Add some missing Nullable annotations
  • Loading branch information
swankjesse authored Nov 16, 2018
2 parents 6e2643f + f1524cd commit 69a81a9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion retrofit/src/main/java/retrofit2/Converter.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
* into the {@link Retrofit} instance.
*/
public interface Converter<F, T> {
T convert(F value) throws IOException;
@Nullable T convert(F value) throws IOException;

/** Creates {@link Converter} instances based on a type and target usage. */
abstract class Factory {
Expand Down
6 changes: 3 additions & 3 deletions retrofit/src/main/java/retrofit2/OkHttpCall.java
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ public void cancel() {
}

static final class NoContentResponseBody extends ResponseBody {
private final MediaType contentType;
private final @Nullable MediaType contentType;
private final long contentLength;

NoContentResponseBody(MediaType contentType, long contentLength) {
NoContentResponseBody(@Nullable MediaType contentType, long contentLength) {
this.contentType = contentType;
this.contentLength = contentLength;
}
Expand All @@ -275,7 +275,7 @@ static final class NoContentResponseBody extends ResponseBody {

static final class ExceptionCatchingResponseBody extends ResponseBody {
private final ResponseBody delegate;
IOException thrownException;
@Nullable IOException thrownException;

ExceptionCatchingResponseBody(ResponseBody delegate) {
this.delegate = delegate;
Expand Down
2 changes: 1 addition & 1 deletion retrofit/src/main/java/retrofit2/Retrofit.java
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ public Builder newBuilder() {
public static final class Builder {
private final Platform platform;
private @Nullable okhttp3.Call.Factory callFactory;
private HttpUrl baseUrl;
private @Nullable HttpUrl baseUrl;
private final List<Converter.Factory> converterFactories = new ArrayList<>();
private final List<CallAdapter.Factory> callAdapterFactories = new ArrayList<>();
private @Nullable Executor callbackExecutor;
Expand Down

0 comments on commit 69a81a9

Please sign in to comment.