From b629488ffc7d68158158d9197695158f97229c7b Mon Sep 17 00:00:00 2001 From: Chanseok Oh Date: Wed, 1 Dec 2021 16:46:15 -0500 Subject: [PATCH] fix: revert generics syntax change in MockHttpService test utility (#1574) * fix: revert generic change in method signature of MockHttpService --- .../httpjson/longrunning/stub/HttpJsonOperationsStub.java | 4 ++-- .../com/google/api/gax/httpjson/MockHttpServiceTest.java | 2 +- .../com/google/api/gax/httpjson/testing/MockHttpService.java | 5 ++--- 3 files changed, 5 insertions(+), 6 deletions(-) diff --git a/gax-httpjson/src/main/java/com/google/api/gax/httpjson/longrunning/stub/HttpJsonOperationsStub.java b/gax-httpjson/src/main/java/com/google/api/gax/httpjson/longrunning/stub/HttpJsonOperationsStub.java index 4aadf7a60..dd9cfb54a 100644 --- a/gax-httpjson/src/main/java/com/google/api/gax/httpjson/longrunning/stub/HttpJsonOperationsStub.java +++ b/gax-httpjson/src/main/java/com/google/api/gax/httpjson/longrunning/stub/HttpJsonOperationsStub.java @@ -297,8 +297,8 @@ protected HttpJsonOperationsStub( } @InternalApi - public static List> getMethodDescriptors() { - List> methodDescriptors = new ArrayList<>(); + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); methodDescriptors.add(listOperationsMethodDescriptor); methodDescriptors.add(getOperationMethodDescriptor); methodDescriptors.add(deleteOperationMethodDescriptor); diff --git a/gax-httpjson/src/test/java/com/google/api/gax/httpjson/MockHttpServiceTest.java b/gax-httpjson/src/test/java/com/google/api/gax/httpjson/MockHttpServiceTest.java index 0fab4d9a0..3571275e9 100644 --- a/gax-httpjson/src/test/java/com/google/api/gax/httpjson/MockHttpServiceTest.java +++ b/gax-httpjson/src/test/java/com/google/api/gax/httpjson/MockHttpServiceTest.java @@ -143,7 +143,7 @@ public PathTemplate getPathTemplate() { .setResponseParser(PET_RESPONSE_PARSER) .build(); - private static final List> SERVER_METHOD_DESCRIPTORS = + private static final List SERVER_METHOD_DESCRIPTORS = Lists.newArrayList(methodDescriptor); private static MockHttpService testService = diff --git a/gax-httpjson/src/test/java/com/google/api/gax/httpjson/testing/MockHttpService.java b/gax-httpjson/src/test/java/com/google/api/gax/httpjson/testing/MockHttpService.java index d644afd6d..e6fb4d586 100644 --- a/gax-httpjson/src/test/java/com/google/api/gax/httpjson/testing/MockHttpService.java +++ b/gax-httpjson/src/test/java/com/google/api/gax/httpjson/testing/MockHttpService.java @@ -55,7 +55,7 @@ public final class MockHttpService extends MockHttpTransport { private final Multimap requestHeaders = LinkedListMultimap.create(); private final List requestPaths = new LinkedList<>(); private final Queue responseHandlers = new LinkedList<>(); - private List> serviceMethodDescriptors; + private List 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> serviceMethodDescriptors, String pathPrefix) { + public MockHttpService(List serviceMethodDescriptors, String pathPrefix) { this.serviceMethodDescriptors = ImmutableList.copyOf(serviceMethodDescriptors); endpoint = pathPrefix; }