avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon-sandbox/merlin/activation/src/java/org/apache/avalon/activation/appliance/impl DefaultServiceManager.java
Date Mon, 01 Sep 2003 19:32:03 GMT
mcconnell    2003/09/01 12:32:03

  Modified:    merlin/activation/src/java/org/apache/avalon/activation/appliance/impl
                        DefaultServiceManager.java
  Log:
  Throw exception instead of logging error when releasing invalid objects.
  
  Revision  Changes    Path
  1.3       +11 -9     avalon-sandbox/merlin/activation/src/java/org/apache/avalon/activation/appliance/impl/DefaultServiceManager.java
  
  Index: DefaultServiceManager.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/activation/src/java/org/apache/avalon/activation/appliance/impl/DefaultServiceManager.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultServiceManager.java	30 Aug 2003 18:36:54 -0000	1.2
  +++ DefaultServiceManager.java	1 Sep 2003 19:32:02 -0000	1.3
  @@ -175,24 +175,26 @@
           final String key = (String) m_table.get( link );
           if( key == null )
           {
  -            final String warning = 
  -              "Ignoring attempt to release an object [" 
  +            final String error = 
  +              "Illegal attempt to release an object [" 
                 + id 
                 + "] that was not established by this service manager.";
  -            getLogger().warn( warning );
  -            return;
  +            throw new IllegalArgumentException( error );
  +            //getLogger().warn( warning );
  +            //return;
           }
   
           final Home provider = (Home) m_map.get( key );
           if( provider == null )
           {
  -            final String warning = 
  -              "Internal inconsistency. "
  -              + "Unable to release component as no provider could be found for the key
["
  +            final String error = 
  +              "Unable to release component as no provider could be found for the key ["
                 + key
                 + "].";
  -            getLogger().warn( warning );
  -            return;
  +            throw new IllegalStateException( error );
  +
  +            //getLogger().warn( warning );
  +            //return;
           }
   
           try
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message