Skip to content
Permalink
Browse files
fix: revert generics syntax change in MockHttpService test utility (#…
…1574)

* fix: revert generic change in method signature of MockHttpService
  • Loading branch information
chanseokoh committed Dec 1, 2021
1 parent 6e12445 commit b629488ffc7d68158158d9197695158f97229c7b
@@ -297,8 +297,8 @@ protected HttpJsonOperationsStub(
}

@InternalApi
public static List<ApiMethodDescriptor<?, ?>> getMethodDescriptors() {
List<ApiMethodDescriptor<?, ?>> methodDescriptors = new ArrayList<>();
public static List<ApiMethodDescriptor> getMethodDescriptors() {
List<ApiMethodDescriptor> methodDescriptors = new ArrayList<>();
methodDescriptors.add(listOperationsMethodDescriptor);
methodDescriptors.add(getOperationMethodDescriptor);
methodDescriptors.add(deleteOperationMethodDescriptor);
@@ -143,7 +143,7 @@ public PathTemplate getPathTemplate() {
.setResponseParser(PET_RESPONSE_PARSER)
.build();

private static final List<ApiMethodDescriptor<?, ?>> SERVER_METHOD_DESCRIPTORS =
private static final List<ApiMethodDescriptor> SERVER_METHOD_DESCRIPTORS =
Lists.newArrayList(methodDescriptor);

private static MockHttpService testService =
@@ -55,7 +55,7 @@ public final class MockHttpService extends MockHttpTransport {
private final Multimap<String, String> requestHeaders = LinkedListMultimap.create();
private final List<String> requestPaths = new LinkedList<>();
private final Queue<HttpResponseFactory> responseHandlers = new LinkedList<>();
private List<ApiMethodDescriptor<?, ?>> serviceMethodDescriptors;
private List<ApiMethodDescriptor> serviceMethodDescriptors;
private String endpoint;

/**
@@ -66,8 +66,7 @@ public final class MockHttpService extends MockHttpTransport {
* @param pathPrefix - the fixed portion of the endpoint URL that prefixes the methods' path
* template substring.
*/
public MockHttpService(
List<ApiMethodDescriptor<?, ?>> serviceMethodDescriptors, String pathPrefix) {
public MockHttpService(List<ApiMethodDescriptor> serviceMethodDescriptors, String pathPrefix) {
this.serviceMethodDescriptors = ImmutableList.copyOf(serviceMethodDescriptors);
endpoint = pathPrefix;
}

0 comments on commit b629488

Please sign in to comment.