Skip to content

Commit

Permalink
Merge pull request square#3618 from square/jw/platform/2021-08-17
Browse files Browse the repository at this point in the history
Use one subtype per platform for simplicity
  • Loading branch information
swankjesse authored Sep 20, 2021
2 parents 936bb98 + a850fc1 commit af55996
Show file tree
Hide file tree
Showing 8 changed files with 313 additions and 165 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit2;

import android.annotation.TargetApi;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
Expand All @@ -23,9 +24,8 @@
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;

@IgnoreJRERequirement // Only added when CompletableFuture is available (Java 8+ / Android API 24+).
@TargetApi(24)
final class CompletableFutureCallAdapterFactory extends CallAdapter.Factory {
static final CallAdapter.Factory INSTANCE = new CompletableFutureCallAdapterFactory();

@Override
public @Nullable CallAdapter<?, ?> get(
Type returnType, Annotation[] annotations, Retrofit retrofit) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/
package retrofit2;

import android.annotation.TargetApi;
import java.io.IOException;
import java.lang.annotation.Annotation;
import java.lang.reflect.ParameterizedType;
Expand All @@ -25,9 +26,8 @@
import org.codehaus.mojo.animal_sniffer.IgnoreJRERequirement;

@IgnoreJRERequirement // Only added when Optional is available (Java 8+ / Android API 24+).
@TargetApi(24)
final class OptionalConverterFactory extends Converter.Factory {
static final Converter.Factory INSTANCE = new OptionalConverterFactory();

@Override
public @Nullable Converter<ResponseBody, ?> responseBodyConverter(
Type type, Annotation[] annotations, Retrofit retrofit) {
Expand Down
Loading

0 comments on commit af55996

Please sign in to comment.