Polish
This commit is contained in:
parent
dab7e03c93
commit
cf10cee16a
|
|
@ -1046,12 +1046,9 @@ public class AutowiredAnnotationBeanPostProcessor implements SmartInstantiationA
|
|||
}
|
||||
|
||||
private CodeBlock generateParameterTypesCode(Class<?>[] parameterTypes) {
|
||||
CodeBlock.Builder code = CodeBlock.builder();
|
||||
for (int i = 0; i < parameterTypes.length; i++) {
|
||||
code.add((i != 0 ? ", " : ""));
|
||||
code.add("$T.class", parameterTypes[i]);
|
||||
}
|
||||
return code.build();
|
||||
return CodeBlock.join(Arrays.stream(parameterTypes)
|
||||
.map(parameterType -> CodeBlock.of("$T.class", parameterType))
|
||||
.toList(), ", ");
|
||||
}
|
||||
|
||||
private void registerHints(RuntimeHints runtimeHints) {
|
||||
|
|
|
|||
|
|
@ -235,7 +235,7 @@ class DefaultBeanRegistrationCodeFragments implements BeanRegistrationCodeFragme
|
|||
}
|
||||
return new InstanceSupplierCodeGenerator(generationContext,
|
||||
beanRegistrationCode.getClassName(), beanRegistrationCode.getMethods(), allowDirectSupplierShortcut)
|
||||
.generateCode(this.registeredBean,this.constructorOrFactoryMethod.get());
|
||||
.generateCode(this.registeredBean, this.constructorOrFactoryMethod.get());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Reference in New Issue