You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by mc...@apache.org on 2002/02/11 14:42:48 UTC
cvs commit: jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/logger/factory ServletTargetFactory.java
mcconnell 02/02/11 05:42:48
Modified: src/java/org/apache/avalon/excalibur/logger/factory
ServletTargetFactory.java
Log:
applied patch to trap NullPointer case and JavaDoc correction submitted by Mark Woon
Revision Changes Path
1.6 +8 -4 jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/logger/factory/ServletTargetFactory.java
Index: ServletTargetFactory.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/java/org/apache/avalon/excalibur/logger/factory/ServletTargetFactory.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- ServletTargetFactory.java 9 Feb 2002 00:29:57 -0000 1.5
+++ ServletTargetFactory.java 11 Feb 2002 13:42:48 -0000 1.6
@@ -21,9 +21,10 @@
/**
* ServletTargetFactory class.
*
- * This factory creates a ServletOutputLogTargets. It uses the context-key attribute
- * to locate the ServletContext needed out of the Context object passed to this factory.
- * The default context-key is "servlet-context".
+ * This factory creates a ServletOutputLogTargets. It uses the
+ * context-key attribute to locate the required ServletContext from
+ * the Context object passed to this factory. The default context-key
+ * is <code>servlet-context</code>.
*
* <pre>
*
@@ -45,7 +46,7 @@
* </dl>
*
* @author <a href="mailto:giacomo@apache.org">Giacomo Pati</a>
- * @version CVS $Revision: 1.5 $ $Date: 2002/02/09 00:29:57 $
+ * @version CVS $Revision: 1.6 $ $Date: 2002/02/11 13:42:48 $
* @since 4.0
*/
public final class ServletTargetFactory
@@ -58,6 +59,9 @@
public final LogTarget createTarget( final Configuration configuration )
throws ConfigurationException
{
+ if( m_context == null ) {
+ throw new ConfigurationException( "Context not available." );
+ }
final String contextkey =
m_configuration.getAttribute( "context-key", "servlet-context" );
final ServletContext sctx;
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>