From 5c4362bbc4ebf84553513e7893294b9828c24b53 Mon Sep 17 00:00:00 2001 From: Koos Gadellaa Date: Thu, 18 Aug 2022 08:55:59 +0200 Subject: [PATCH] Refresh parsers when not found Closes gh-3065 --- .../security/config/SecurityNamespaceHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/config/src/main/java/org/springframework/security/config/SecurityNamespaceHandler.java b/config/src/main/java/org/springframework/security/config/SecurityNamespaceHandler.java index d3dd04a7d9..1750dd4ce5 100644 --- a/config/src/main/java/org/springframework/security/config/SecurityNamespaceHandler.java +++ b/config/src/main/java/org/springframework/security/config/SecurityNamespaceHandler.java @@ -101,6 +101,7 @@ public final class SecurityNamespaceHandler implements NamespaceHandler { if (parser == null) { // SEC-1455. Load parsers when required, not just on init(). loadParsers(); + parser = this.parsers.get(name); } if (parser != null) { return parser.parse(element, pc);