svn commit: rev 30988 - avalon/trunk/planet/facilities/http/impl/src/main/org/apache/avalon/http/impl

[email protected]
Newsgroups gmane.comp.jakarta.avalon.cvs
Message-ID <[email protected]>
Author: niclas
Date: Fri Jul 30 04:06:49 2004
New Revision: 30988

Modified:
   avalon/trunk/planet/facilities/http/impl/src/main/org/apache/avalon/http/impl/HttpContextImpl.java
Log:
Added a proper hasService() check for the optional MimeTypes dependency.

Modified: avalon/trunk/planet/facilities/http/impl/src/main/org/apache/avalon/http/impl/HttpContextImpl.java
==============================================================================
--- avalon/trunk/planet/facilities/http/impl/src/main/org/apache/avalon/http/impl/HttpContextImpl.java	(original)
+++ avalon/trunk/planet/facilities/http/impl/src/main/org/apache/avalon/http/impl/HttpContextImpl.java	Fri Jul 30 04:06:49 2004
@@ -151,7 +151,8 @@
         
         m_RequestLog = (RequestLog) man.lookup( "request-log" );
         
-        m_MimeTypes = (MimeTypes) man.lookup( "mimetypes" );
+        if( man.hasService( "mimetypes" ) )
+            m_MimeTypes = (MimeTypes) man.lookup( "mimetypes" );
     }
 
     public void parameterize( Parameters params )
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.