From aab26327e89453869ff289232e1e0546191ff90f Mon Sep 17 00:00:00 2001 From: Chanseok Oh Date: Wed, 1 Dec 2021 15:24:34 -0500 Subject: [PATCH 1/3] fix: revert generic change in method signature of MockHttpService --- .../java/com/google/api/gax/httpjson/MockHttpServiceTest.java | 2 +- .../com/google/api/gax/httpjson/testing/MockHttpService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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..72725069c 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 @@ -67,7 +67,7 @@ public final class MockHttpService extends MockHttpTransport { * template substring. */ public MockHttpService( - List> serviceMethodDescriptors, String pathPrefix) { + List serviceMethodDescriptors, String pathPrefix) { this.serviceMethodDescriptors = ImmutableList.copyOf(serviceMethodDescriptors); endpoint = pathPrefix; } From 58c15f3819551e35e20027f79315072f90faecb6 Mon Sep 17 00:00:00 2001 From: Chanseok Oh Date: Wed, 1 Dec 2021 15:31:10 -0500 Subject: [PATCH 2/3] chore: format code --- .../com/google/api/gax/httpjson/testing/MockHttpService.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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 72725069c..c0254d27a 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 @@ -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; } From 9b800bfb8d02832e3eed75415b4553b098692ac2 Mon Sep 17 00:00:00 2001 From: Chanseok Oh Date: Wed, 1 Dec 2021 15:41:05 -0500 Subject: [PATCH 3/3] fix: fix compilation errors --- .../gax/httpjson/longrunning/stub/HttpJsonOperationsStub.java | 4 ++-- .../com/google/api/gax/httpjson/testing/MockHttpService.java | 2 +- 2 files changed, 3 insertions(+), 3 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/testing/MockHttpService.java b/gax-httpjson/src/test/java/com/google/api/gax/httpjson/testing/MockHttpService.java index c0254d27a..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; /**