Skip to content

Commit 9a339c9

Browse files
committed
Formatting
1 parent a6ab22b commit 9a339c9

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

grpc-client-spring-boot-autoconfigure/src/main/java/net/devh/boot/grpc/client/inject/GrpcClientBeanPostProcessor.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ protected <T> T valueForMember(final String name, final Member injectionTarget,
229229

230230
/**
231231
* Creates a stub instance for the specified stub type using the resolved {@link StubFactory}.
232-
*
232+
*
233233
* @param stubClass The stub class that needs to be created.
234234
* @param channel The gRPC channel associated with the created stub, passed as a parameter to the stub factory.
235235
* @throws BeanInstantiationException If the stub couldn't be created, either because the type isn't supported or
236236
* because of a failure in creation.
237237
* @return A newly created gRPC stub.
238238
*/
239-
private AbstractStub<?> createStub(Class<? extends AbstractStub<?>> stubClass, Channel channel) {
239+
private AbstractStub<?> createStub(final Class<? extends AbstractStub<?>> stubClass, final Channel channel) {
240240
final StubFactory factory = getStubFactories().stream()
241241
.filter(stubFactory -> stubFactory.isApplicable(stubClass))
242242
.findFirst()
@@ -245,7 +245,7 @@ private AbstractStub<?> createStub(Class<? extends AbstractStub<?>> stubClass, C
245245

246246
try {
247247
return factory.createStub(stubClass, channel);
248-
} catch (Exception exception) {
248+
} catch (final Exception exception) {
249249
throw new BeanInstantiationException(stubClass, "Failed to create gRPC stub of type " + stubClass.getName(),
250250
exception);
251251
}
@@ -258,8 +258,9 @@ private AbstractStub<?> createStub(Class<? extends AbstractStub<?>> stubClass, C
258258
*/
259259
private List<StubFactory> getStubFactories() {
260260
if (this.stubFactories == null) {
261-
stubFactories = new ArrayList<>(applicationContext.getBeansOfType(StubFactory.class).values());
261+
this.stubFactories = new ArrayList<>(this.applicationContext.getBeansOfType(StubFactory.class).values());
262262
}
263-
return stubFactories;
263+
return this.stubFactories;
264264
}
265+
265266
}

0 commit comments

Comments
 (0)