FAQ
sgoeschl 2005/04/26 05:34:48

Modified: yaafi/src/java/org/apache/fulcrum/yaafi/service/servicemanager
ServiceManagerServiceImpl.java
Log:
Setting default parameters after dispose() to avoid any NPE when accessing the singleton

Revision Changes Path
1.3 +3 -2 jakarta-turbine-fulcrum/yaafi/src/java/org/apache/fulcrum/yaafi/service/servicemanager/ServiceManagerServiceImpl.java

Index: ServiceManagerServiceImpl.java
===================================================================
RCS file: /home/cvs/jakarta-turbine-fulcrum/yaafi/src/java/org/apache/fulcrum/yaafi/service/servicemanager/ServiceManagerServiceImpl.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ServiceManagerServiceImpl.java 9 Mar 2005 13:33:16 -0000 1.2
+++ ServiceManagerServiceImpl.java 26 Apr 2005 12:34:48 -0000 1.3
@@ -21,6 +21,7 @@
import org.apache.avalon.framework.context.Context;
import org.apache.avalon.framework.context.ContextException;
import org.apache.avalon.framework.context.Contextualizable;
+import org.apache.avalon.framework.context.DefaultContext;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.parameters.ParameterException;
@@ -120,8 +121,8 @@
public void dispose()
{
this.serviceManager = null;
- this.parameters = null;
- this.context = null;
+ this.parameters = new Parameters();
+ this.context = new DefaultContext();
ServiceManagerServiceImpl.instance = null;
}





---------------------------------------------------------------------
To unsubscribe, e-mail: turbine-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: turbine-dev-help@jakarta.apache.org

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categoriesturbine
postedApr 26, '05 at 12:34p
activeApr 26, '05 at 12:34p
posts1
users1
websiteturbine.apache.org

1 user in discussion

Sgoeschl: 1 post

People

Translate

site design / logo © 2019 Grokbase