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 AbstractAppliance.java DefaultApplianceRepository.java DefaultServiceManager.java
Date Mon, 08 Sep 2003 13:37:42 GMT
mcconnell    2003/09/08 06:37:42

  Modified:    merlin/activation/src/java/org/apache/avalon/activation/appliance/impl
                        AbstractAppliance.java
                        DefaultApplianceRepository.java
                        DefaultServiceManager.java
  Log:
  Switch from Integer index to String index.
  
  Revision  Changes    Path
  1.2       +1 -2      avalon-sandbox/merlin/activation/src/java/org/apache/avalon/activation/appliance/impl/AbstractAppliance.java
  
  Index: AbstractAppliance.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/activation/src/java/org/apache/avalon/activation/appliance/impl/AbstractAppliance.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- AbstractAppliance.java	7 Aug 2003 17:11:11 -0000	1.1
  +++ AbstractAppliance.java	8 Sep 2003 13:37:42 -0000	1.2
  @@ -57,7 +57,6 @@
   import org.apache.avalon.activation.appliance.Appliance;
   import org.apache.avalon.activation.appliance.ApplianceException;
   import org.apache.avalon.activation.appliance.ApplianceRepository;
  -import org.apache.avalon.activation.appliance.DependencyGraph;
   import org.apache.avalon.composition.data.ContextDirective;
   import org.apache.avalon.composition.data.CategoriesDirective;
   import org.apache.avalon.composition.model.Model;
  
  
  
  1.2       +1 -2      avalon-sandbox/merlin/activation/src/java/org/apache/avalon/activation/appliance/impl/DefaultApplianceRepository.java
  
  Index: DefaultApplianceRepository.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/merlin/activation/src/java/org/apache/avalon/activation/appliance/impl/DefaultApplianceRepository.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- DefaultApplianceRepository.java	7 Aug 2003 17:11:14 -0000	1.1
  +++ DefaultApplianceRepository.java	8 Sep 2003 13:37:42 -0000	1.2
  @@ -57,7 +57,6 @@
   import org.apache.avalon.activation.appliance.Appliance;
   import org.apache.avalon.activation.appliance.ApplianceRepository;
   import org.apache.avalon.activation.appliance.ApplianceException;
  -import org.apache.avalon.activation.appliance.DependencyGraph;
   import org.apache.avalon.composition.model.Model;
   import org.apache.avalon.meta.info.DependencyDescriptor;
   import org.apache.avalon.meta.info.StageDescriptor;
  
  
  
  1.5       +5 -10     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.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DefaultServiceManager.java	8 Sep 2003 06:12:21 -0000	1.4
  +++ DefaultServiceManager.java	8 Sep 2003 13:37:42 -0000	1.5
  @@ -145,7 +145,8 @@
           try
           {
               Object object = provider.resolve( this );
  -            m_table.put( new Integer( System.identityHashCode( object ) ), key );
  +            String id = "" + System.identityHashCode( object );
  +            m_table.put( id, key );
               return object;
           }
           catch( Throwable e )
  @@ -172,9 +173,8 @@
       {
           if( object == null ) return;
   
  -        int id = System.identityHashCode( object );
  -        Integer link = new Integer( id );
  -        final String key = (String) m_table.get( link );
  +        String id = "" + System.identityHashCode( object );
  +        final String key = (String) m_table.get( id );
           if( key == null )
           {
               final String error = 
  @@ -182,8 +182,6 @@
                 + id 
                 + "] that was not established by this service manager.";
               throw new IllegalArgumentException( error );
  -            //getLogger().warn( warning );
  -            //return;
           }
   
           final Home provider = (Home) m_map.get( key );
  @@ -194,9 +192,6 @@
                 + key
                 + "].";
               throw new IllegalStateException( error );
  -
  -            //getLogger().warn( warning );
  -            //return;
           }
   
           try
  @@ -212,7 +207,7 @@
           }
           finally
           {
  -            m_table.remove( link );
  +            m_table.remove( id );
           }
       }
   }
  
  
  

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


Mime
View raw message