Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
fix: revert generics syntax change in MockHttpService test utility (#…
Browse files Browse the repository at this point in the history
…1574)

* fix: revert generic change in method signature of MockHttpService
  • Loading branch information
chanseokoh committed Dec 1, 2021
1 parent 6e12445 commit b629488
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

/**
Expand All @@ -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;
}
Expand Down

0 comments on commit b629488

Please sign in to comment.