Browse Source

Adjust to upstream changes.

pull/1135/head
Olga Maciaszek-Sharma 2 years ago
parent
commit
01743d94d8
  1. 5
      spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/aot/LoadBalancerChildContextInitializer.java
  2. 9
      src/checkstyle/checkstyle-suppressions.xml

5
spring-cloud-loadbalancer/src/main/java/org/springframework/cloud/loadbalancer/aot/LoadBalancerChildContextInitializer.java

@ -148,13 +148,12 @@ public class LoadBalancerChildContextInitializer
@Override @Override
public void applyTo(GenerationContext generationContext, BeanRegistrationCode beanRegistrationCode) { public void applyTo(GenerationContext generationContext, BeanRegistrationCode beanRegistrationCode) {
ApplicationContextAotGenerator contextAotGenerator = new ApplicationContextAotGenerator();
Map<String, ClassName> generatedInitializerClassNames = childContexts.entrySet().stream().map(entry -> { Map<String, ClassName> generatedInitializerClassNames = childContexts.entrySet().stream().map(entry -> {
String name = entry.getValue().getDisplayName(); String name = entry.getValue().getDisplayName();
name = name.replaceAll("[-]", "_"); name = name.replaceAll("[-]", "_");
GenerationContext childGenerationContext = generationContext.withName(name); GenerationContext childGenerationContext = generationContext.withName(name);
ClassName initializerClassName = contextAotGenerator.generateApplicationContext(entry.getValue(), ClassName initializerClassName = new ApplicationContextAotGenerator()
childGenerationContext); .processAheadOfTime(entry.getValue(), childGenerationContext);
return Map.entry(entry.getKey(), initializerClassName); return Map.entry(entry.getKey(), initializerClassName);
}).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue)); }).collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
GeneratedMethod postProcessorMethod = beanRegistrationCode.getMethods().add("addChildContextInitializer", GeneratedMethod postProcessorMethod = beanRegistrationCode.getMethods().add("addChildContextInitializer",

9
src/checkstyle/checkstyle-suppressions.xml

@ -4,15 +4,14 @@
"https://www.puppycrawl.com/dtds/suppressions_1_1.dtd"> "https://www.puppycrawl.com/dtds/suppressions_1_1.dtd">
<suppressions> <suppressions>
<suppress files=".*TestBootstrapConfiguration.*" checks="JavadocVariable"/> <suppress files=".*TestBootstrapConfiguration.*" checks="JavadocVariable"/>
<suppress files=".*BootstrapConfigurationTests.*" checks="JavadocStyle"/>
<suppress files=".*BootstrapConfigurationTests.*" checks="JavadocVariable"/>
<suppress files=".*TestHigherPriorityBootstrapConfiguration.*" checks="HideUtilityClassConstructor"/> <suppress files=".*TestHigherPriorityBootstrapConfiguration.*" checks="HideUtilityClassConstructor"/>
<suppress files=".*TestHigherPriorityBootstrapConfiguration.*" checks="JavadocVariable"/> <suppress files=".*TestHigherPriorityBootstrapConfiguration.*" checks="JavadocVariable"/>
<suppress files=".*RefreshScopeConfigurationTests.*" checks="JavadocStyle"/>
<suppress files=".*RefreshScopeConfigurationTests.*" checks="JavadocMethod"/> <suppress files=".*RefreshScopeConfigurationTests.*" checks="JavadocMethod"/>
<suppress files=".*RefreshScopeConfigurationTests.*" checks="JavadocVariable"/>
<suppress files=".*RefreshAutoConfigurationTests.*" checks="JavadocVariable"/>
<suppress files=".*RefreshAutoConfigurationMoreClassPathTests.*" checks="JavadocVariable"/> <suppress files=".*RefreshAutoConfigurationMoreClassPathTests.*" checks="JavadocVariable"/>
<suppress files=".*EnvironmentDecryptApplicationInitializerTests.*" checks="JavadocVariable"/> <suppress files=".*EnvironmentDecryptApplicationInitializerTests.*" checks="JavadocVariable"/>
<suppress files=".*CachingServiceInstanceListSupplierTests.*" checks="RegexpSinglelineJava"/> <suppress files=".*CachingServiceInstanceListSupplierTests.*" checks="RegexpSinglelineJava"/>
<suppress files=".*Tests.*" checks="JavadocStyle"/>
<suppress files=".*Tests.*" checks="JavadocVariable"/>
<suppress files=".*Tests.*" checks="JavadocMethod"/>
<suppress files=".*Tests.*" checks="HideUtilityClassConstructor"/>
</suppressions> </suppressions>

Loading…
Cancel
Save