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

jleroux pushed a commit to branch trunk
in repository https://gitbox.apache.org/repos/asf/ofbiz-plugins.git


The following commit(s) were added to refs/heads/trunk by this push:
     new 537a459  Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
537a459 is described below

commit 537a4591e22bc7b19875478b1e83a6892e92a944
Author: Jacques Le Roux <jacques.le.r...@les7arts.com>
AuthorDate: Thu Dec 23 17:13:54 2021 +0100

    Improved: Fix some bugs Spotbugs reports (OFBIZ-12386)
    
    We don't fear collisions for "servletContext". It's only initialised by
    contextInitialized() and then only read before being destroyed by
    contextDestroyed()
    
    Also initialises servletContextto null
---
 .../main/java/org/apache/ofbiz/ws/rs/listener/ApiContextListener.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/rest-api/src/main/java/org/apache/ofbiz/ws/rs/listener/ApiContextListener.java
 
b/rest-api/src/main/java/org/apache/ofbiz/ws/rs/listener/ApiContextListener.java
index 256ca01..1c06b5f 100644
--- 
a/rest-api/src/main/java/org/apache/ofbiz/ws/rs/listener/ApiContextListener.java
+++ 
b/rest-api/src/main/java/org/apache/ofbiz/ws/rs/listener/ApiContextListener.java
@@ -30,7 +30,7 @@ import org.apache.ofbiz.webapp.WebAppUtil;
 public class ApiContextListener implements ServletContextListener {
 
     public static final String MODULE = ApiContextListener.class.getName();
-    private static ServletContext servletContext;
+    private static ServletContext servletContext = null;
 
     /**
      */

Reply via email to