From fc1de937a8b5c1337a780ea2b1d9d2aec5ad4097 Mon Sep 17 00:00:00 2001 From: Chris Bono Date: Sun, 12 Jan 2025 12:14:51 -0600 Subject: [PATCH] Polish "Update broken code examples in docs" This continues the effort of the previous commit to update broken code examples. --- README.md | 4 ++-- .../src/main/antora/modules/ROOT/pages/getting-started.adoc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 77709f6..aa140fb 100644 --- a/README.md +++ b/README.md @@ -240,7 +240,7 @@ To create a simple gRPC client, you can use the Spring Boot starter (see above - ```java @Bean SimpleGrpc.SimpleBlockingStub stub(GrpcChannelFactory channels) { - return SimpleGrpc.newBlockingStub(channels.createChannel("0.0.0.0:9090").build()); + return SimpleGrpc.newBlockingStub(channels.createChannel("0.0.0.0:9090")); } ``` @@ -251,7 +251,7 @@ The default `GrpcChannelFactory` implementation can also create a "named" channe ```java @Bean SimpleGrpc.SimpleBlockingStub stub(GrpcChannelFactory channels) { - return SimpleGrpc.newBlockingStub(channels.createChannel("local").build()); + return SimpleGrpc.newBlockingStub(channels.createChannel("local")); } ``` diff --git a/spring-grpc-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc b/spring-grpc-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc index 28683be..64818bc 100644 --- a/spring-grpc-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc +++ b/spring-grpc-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc @@ -250,7 +250,7 @@ To create a simple gRPC client, you can use the Spring Boot starter (see above - ---- @Bean SimpleGrpc.SimpleBlockingStub stub(GrpcChannelFactory channels) { - return SimpleGrpc.newBlockingStub(channels.createChannel("0.0.0.0:9090").build()); + return SimpleGrpc.newBlockingStub(channels.createChannel("0.0.0.0:9090")); } ---- @@ -262,7 +262,7 @@ The default `GrpcChannelFactory` implementation can also create a "named" channe ---- @Bean SimpleGrpc.SimpleBlockingStub stub(GrpcChannelFactory channels) { - return SimpleGrpc.newBlockingStub(channels.createChannel("local").build()); + return SimpleGrpc.newBlockingStub(channels.createChannel("local")); } ----