This is an automated email from the ASF dual-hosted git repository.

kusal pushed a commit to branch WW-5364-npe
in repository https://gitbox.apache.org/repos/asf/struts.git

commit 29422e47fe9a4aa85edf3c02836de847a3f62ea9
Author: Kusal Kithul-Godage <g...@kusal.io>
AuthorDate: Wed Mar 13 21:49:27 2024 +1100

    WW-5364 Fix potential NPE in XmlDocConfigurationProvider
---
 .../xwork2/config/providers/XmlDocConfigurationProvider.java          | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlDocConfigurationProvider.java
 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlDocConfigurationProvider.java
index bae553789..cad52fb79 100644
--- 
a/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlDocConfigurationProvider.java
+++ 
b/core/src/main/java/com/opensymphony/xwork2/config/providers/XmlDocConfigurationProvider.java
@@ -142,7 +142,9 @@ public abstract class XmlDocConfigurationProvider 
implements ConfigurationProvid
 
     @Override
     public void destroy() {
-        providerAllowlist.clearAllowlist(this);
+        if (providerAllowlist != null) {
+            providerAllowlist.clearAllowlist(this);
+        }
     }
 
     protected Class<?> allowAndLoadClass(String className) throws 
ClassNotFoundException {

Reply via email to