Commits

Anonymous committed f705d76

XW-523 ( eliminate the use of static block to call ConfigurationManager's destroyConfiguration() method )
XW-522 ( Interceptor destroy() method is never called. )

git-svn-id: http://svn.opensymphony.com/svn/webwork/trunk@2915573baa09-0c28-0410-bef9-dab3c582ae83

  • Participants
  • Parent commits 7959a28

Comments (0)

Files changed (2)

File src/java/com/opensymphony/webwork/dispatcher/DispatcherUtils.java

 import com.opensymphony.webwork.util.ObjectFactoryInitializable;
 import com.opensymphony.xwork.*;
 import com.opensymphony.xwork.config.ConfigurationException;
+import com.opensymphony.xwork.config.ConfigurationManager;
 import com.opensymphony.xwork.interceptor.component.ComponentInterceptor;
 import com.opensymphony.xwork.interceptor.component.ComponentManager;
 import com.opensymphony.xwork.util.*;
     }
 
     public void cleanup() {
+    	// clean up ObjectFactory
         ObjectFactory objectFactory = ObjectFactory.getObjectFactory();
         if (objectFactory == null) {
             LOG.warn("Object Factory is null, something is seriously wrong, no clean up will be performed");
                 LOG.error("exception occurred while destroying ObjectFactory ["+objectFactory+"]", e);
             }
         }
+        
+        // clean up ConfigurationManager
+        ConfigurationManager.destroyConfiguration();
     }
 
     protected void init(ServletContext servletContext) {

File src/test/com/opensymphony/webwork/views/jsp/ui/FormTagTest.java

 import com.opensymphony.xwork.config.entities.ActionConfig;
 import com.opensymphony.xwork.config.entities.InterceptorMapping;
 
+import java.util.Collections;
 import java.util.List;
 import java.util.Map;
 import java.util.ArrayList;
     					return actionConfig;
     				}
     				public Map getActionConfigs() {
-    					return null;
+    					return Collections.EMPTY_MAP;
     				}
     			};
     		}
     					return actionConfig;
     				}
     				public Map getActionConfigs() {
-    					return null;
+    					return Collections.EMPTY_MAP;
     				}
     			};
     		}