Commit cc66de28 authored by dreis2211's avatar dreis2211 Committed by Phillip Webb

Populate cache in ConfigFileApplicationListener

Fix `ConfigFileApplicationListener` so that the loadDocumentsCache is
populated when documents are loaded.

Closes gh-12732
parent 35b4cd01
......@@ -539,12 +539,12 @@ public class ConfigFileApplicationListener
private List<Document> loadDocuments(PropertySourceLoader loader, String name,
Resource resource) throws IOException {
loader.load(name, resource);
DocumentsCacheKey cacheKey = new DocumentsCacheKey(loader, resource);
List<Document> documents = this.loadDocumentsCache.get(cacheKey);
if (documents == null) {
List<PropertySource<?>> loaded = loader.load(name, resource);
documents = asDocuments(loaded);
this.loadDocumentsCache.put(cacheKey, documents);
}
return documents;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment