Skip to content

Commit fc1de93

Browse files
committed
Polish "Update broken code examples in docs"
This continues the effort of the previous commit to update broken code examples.
1 parent b861d93 commit fc1de93

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ To create a simple gRPC client, you can use the Spring Boot starter (see above -
240240
```java
241241
@Bean
242242
SimpleGrpc.SimpleBlockingStub stub(GrpcChannelFactory channels) {
243-
return SimpleGrpc.newBlockingStub(channels.createChannel("0.0.0.0:9090").build());
243+
return SimpleGrpc.newBlockingStub(channels.createChannel("0.0.0.0:9090"));
244244
}
245245
```
246246

@@ -251,7 +251,7 @@ The default `GrpcChannelFactory` implementation can also create a "named" channe
251251
```java
252252
@Bean
253253
SimpleGrpc.SimpleBlockingStub stub(GrpcChannelFactory channels) {
254-
return SimpleGrpc.newBlockingStub(channels.createChannel("local").build());
254+
return SimpleGrpc.newBlockingStub(channels.createChannel("local"));
255255
}
256256
```
257257

spring-grpc-docs/src/main/antora/modules/ROOT/pages/getting-started.adoc

+2-2
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ To create a simple gRPC client, you can use the Spring Boot starter (see above -
250250
----
251251
@Bean
252252
SimpleGrpc.SimpleBlockingStub stub(GrpcChannelFactory channels) {
253-
return SimpleGrpc.newBlockingStub(channels.createChannel("0.0.0.0:9090").build());
253+
return SimpleGrpc.newBlockingStub(channels.createChannel("0.0.0.0:9090"));
254254
}
255255
----
256256

@@ -262,7 +262,7 @@ The default `GrpcChannelFactory` implementation can also create a "named" channe
262262
----
263263
@Bean
264264
SimpleGrpc.SimpleBlockingStub stub(GrpcChannelFactory channels) {
265-
return SimpleGrpc.newBlockingStub(channels.createChannel("local").build());
265+
return SimpleGrpc.newBlockingStub(channels.createChannel("local"));
266266
}
267267
----
268268

0 commit comments

Comments
 (0)