bloritsch 2002/09/24 05:36:38
Modified: fortress/src/java/org/apache/excalibur/fortress/lookup
FortressServiceManager.java
Log:
apply patch from Marcus Crafter fixing access problems and the false hasService()
returning true
Revision Changes Path
1.14 +9 -4
jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java
Index: FortressServiceManager.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/fortress/src/java/org/apache/excalibur/fortress/lookup/FortressServiceManager.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- FortressServiceManager.java 17 Sep 2002 17:56:47 -0000 1.13
+++ FortressServiceManager.java 24 Sep 2002 12:36:38 -0000 1.14
@@ -124,13 +124,18 @@
if ( m_components == null )
{
- throw new NullPointerException("The Container is null, the
Servicemanager is unusable");
+ throw new NullPointerException("The Container is null, the
ServiceManager is unusable");
}
}
- public Object obtainService( String role )
+ protected Object obtainService( String role )
throws ServiceException
{
+ if ( !m_components.has( role, null ) )
+ {
+ return null;
+ }
+
Object temp = m_components.get( role, null );
if( temp instanceof ServiceSelector )
@@ -177,7 +182,7 @@
return component;
}
- public boolean serviceExists( String role )
+ protected boolean serviceExists( String role )
{
return m_components.has( role, null );
}
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>