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
This commit is contained in:
Andy Wilkinson 2020-06-18 15:49:34 +01:00
parent 1b62abab9a
commit 67604a5416

View File

@ -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() {