Skip to content

Commit c69b193

Browse files
author
Miguel Gonzalez Sanchez
committed
fix formatting
1 parent a4bf9eb commit c69b193

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

grpc-spring-boot-starter/src/main/java/org/lognet/springboot/grpc/autoconfigure/OnMissingErrorHandlerCondition.java

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,18 @@ public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeM
2727
.get("value");
2828

2929
ReflectionUtils.MethodFilter f = method -> AnnotatedElementUtils.hasAnnotation(method, GRpcExceptionHandler.class);
30-
for (String adviceBeanName : context.getBeanFactory().getBeanNamesForAnnotation(GRpcServiceAdvice.class)) {
30+
for(String adviceBeanName : context.getBeanFactory().getBeanNamesForAnnotation(GRpcServiceAdvice.class)){
3131
BeanDefinition beanDefinition = context.getBeanFactory().getBeanDefinition(adviceBeanName);
3232
String beanClassName = getBeanClassName(beanDefinition);
3333
try {
3434
for (Method method : MethodIntrospector.selectMethods(Class.forName(beanClassName), f)) {
3535
final Optional<Class<? extends Throwable>> handledException = HandlerMethod.getHandledException(method, false);
36-
if (handledException.isPresent() && handledException.get().isAssignableFrom(exc)) {
36+
if(handledException.isPresent() && handledException.get().isAssignableFrom(exc)) {
3737
return ConditionOutcome.noMatch(String.format("Found %s handler at %s.%s",
38-
handledException.get().getName(),
39-
beanClassName,
40-
method.getName()
38+
handledException.get().getName(),
39+
beanClassName,
40+
method.getName()
41+
));
4142
));
4243
}
4344
}
@@ -50,9 +51,9 @@ public ConditionOutcome getMatchOutcome(ConditionContext context, AnnotatedTypeM
5051
}
5152

5253
private String getBeanClassName(BeanDefinition beanDefinition) {
53-
if (beanDefinition instanceof AnnotatedBeanDefinition) {
54+
if(beanDefinition instanceof AnnotatedBeanDefinition){
5455
MethodMetadata factoryMethodMetadata = ((AnnotatedBeanDefinition) beanDefinition).getFactoryMethodMetadata();
55-
if (factoryMethodMetadata != null) {
56+
if(factoryMethodMetadata != null){
5657
return factoryMethodMetadata.getReturnTypeName();
5758
}
5859
}

0 commit comments

Comments
 (0)