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

9
src/checkstyle/checkstyle-suppressions.xml

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

Loading…
Cancel
Save