mirror of
https://github.com/spring-projects/spring-boot.git
synced 2026-10-02 07:19:01 +00:00
Remove duplicate adoc generation in DocumentAutoConfigurationClasses
The task loaded the auto-configuration metadata twice and wrote every module's adoc file twice. When `load()` and `writeNavAdoc()` were introduced, the pre-existing loop that read each metadata file and called `writeModuleAdoc()` was left in place, so each file was generated once from `load()` and then again, identically, by the loop. Remove the redundant loop. The generated output is unchanged. See gh-51438 Signed-off-by: Alexander Makarov <alexander.makarov@nightsong.li>
This commit is contained in:
committed by
Phillip Webb
parent
831b46ccf8
commit
f76e3b6886
-9
@@ -70,15 +70,6 @@ public abstract class DocumentAutoConfigurationClasses extends DefaultTask {
|
||||
FileSystemUtils.deleteRecursively(getOutputDir().getAsFile().get());
|
||||
List<AutoConfiguration> autoConfigurations = load();
|
||||
autoConfigurations.forEach(this::writeModuleAdoc);
|
||||
for (File metadataFile : this.autoConfiguration) {
|
||||
Properties metadata = new Properties();
|
||||
try (Reader reader = new FileReader(metadataFile)) {
|
||||
metadata.load(reader);
|
||||
}
|
||||
AutoConfiguration autoConfiguration = new AutoConfiguration(metadata.getProperty("module"), new TreeSet<>(
|
||||
StringUtils.commaDelimitedListToSet(metadata.getProperty("autoConfigurationClassNames"))));
|
||||
writeModuleAdoc(autoConfiguration);
|
||||
}
|
||||
writeNavAdoc(autoConfigurations);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user