From 67604a54167b0da21d30b9513dac83da582b503a Mon Sep 17 00:00:00 2001 From: Andy Wilkinson Date: Thu, 18 Jun 2020 15:49:34 +0100 Subject: [PATCH] Only process main metadata as it already includes additional metadata Previously, the configuration property table generation was reading both the main metadata and the additional metadata from each project. This was unnecessary as the annotation processor will have already merged the additional metadata into the main metadata before writing it to disk. Processing both the main and additional metadata led to a clash as the metadata overlapped. When the entry in the additional metadata won the clash, the resulting entry in the configuration property table would lose any details that aren't contained in the additional metadata. This commit updates the property table generation code to only use the main metadata files. Fixes gh-21131 --- .../groovy/generateConfigurationPropertyTables.groovy | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/spring-boot-project/spring-boot-docs/src/main/groovy/generateConfigurationPropertyTables.groovy b/spring-boot-project/spring-boot-docs/src/main/groovy/generateConfigurationPropertyTables.groovy index b237fb9646..c205dec26f 100644 --- a/spring-boot-project/spring-boot-docs/src/main/groovy/generateConfigurationPropertyTables.groovy +++ b/spring-boot-project/spring-boot-docs/src/main/groovy/generateConfigurationPropertyTables.groovy @@ -6,12 +6,8 @@ import java.nio.file.Path import java.nio.file.Paths def getConfigMetadataInputStreams() { - def mainMetadata = getClass().getClassLoader().getResources("META-INF/spring-configuration-metadata.json") - def additionalMetadata = getClass().getClassLoader().getResources("META-INF/additional-spring-configuration-metadata.json") - def streams = [] - streams += mainMetadata.collect { new UrlResource(it).getInputStream() } - streams += additionalMetadata.collect { new UrlResource(it).getInputStream() } - return streams + return getClass().getClassLoader().getResources("META-INF/spring-configuration-metadata.json") + .collect { new UrlResource(it).getInputStream() } } def generateConfigMetadataDocumentation() {