Visitar URL original
Unwrap a helper function · googleapis/sdk-platform-java@6bb57b8 · GitHub
Skip to content
This repository was archived by the owner on Oct 29, 2026. It is now read-only.

Commit 6bb57b8

Browse files
committed
Unwrap a helper function
1 parent e384e55 commit 6bb57b8

3 files changed

Lines changed: 5 additions & 7 deletions

File tree

‎src/main/java/com/google/api/generator/gapic/composer/ServiceClientClassComposer.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,6 @@ private static List<MethodDefinition> createServiceMethods(
480480
Map<String, TypeNode> types,
481481
Map<String, ResourceName> resourceNames) {
482482
List<MethodDefinition> javaMethods = new ArrayList<>();
483-
String clientName = getClientClassName(service);
484483
for (Method method : service.methods()) {
485484
if (method.stream().equals(Stream.NONE)) {
486485
javaMethods.addAll(

‎src/main/java/com/google/api/generator/gapic/composer/ServiceClientSampleCodeComposer.java‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,10 @@ static TryCatchStatement composeUnaryPagedRpcMethodSampleCode(
316316
.setIsDecl(true)
317317
.build())
318318
.setCollectionExpr(clientMethodIteratorAllExpr)
319-
.setBody(Arrays.asList(createLineCommentStatement("doThingsWith(element);")))
319+
.setBody(
320+
Arrays.asList(
321+
CommentStatement.withComment(
322+
LineComment.withComment("doThingsWith(element);"))))
320323
.build();
321324

322325
List<Statement> bodyStatements =
@@ -412,8 +415,4 @@ private static boolean isProtoEmptyType(TypeNode type) {
412415
return type.reference().pakkage().equals("com.google.protobuf")
413416
&& type.reference().name().equals("Empty");
414417
}
415-
416-
private static CommentStatement createLineCommentStatement(String content) {
417-
return CommentStatement.withComment(LineComment.withComment(content));
418-
}
419418
}

‎src/test/java/com/google/api/generator/gapic/composer/ServiceClientSampleCodeComposerTest.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ public void invalidComposeRpcMethodHeaderSampleCode_noRepeatedResponseTypeInPage
212212
method, clientType, methodArguments, resourceNames, messageTypes));
213213
}
214214

215-
// ==========================================Unary RPC Method Sample Code=======================//
215+
// =======================================Unary RPC Method Sample Code=======================//
216216
@Test
217217
public void composeUnaryRpcMethodSampleCode_resourceNameMethodArgument() {
218218
FileDescriptor echoFileDescriptor = EchoOuterClass.getDescriptor();

0 commit comments

Comments
 (0)