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/repository/impl/src/java/org/apache/avalon/repository/impl DefaultRepositoryFactory.java
Date Tue, 18 Nov 2003 07:36:57 GMT
mcconnell    2003/11/17 23:36:57

  Modified:    repository/impl/src/java/org/apache/avalon/repository/impl
                        DefaultRepositoryFactory.java
  Log:
  Remove resolution of repository hosts from descriptor (was breaking IOC).
  
  Revision  Changes    Path
  1.8       +15 -3     avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultRepositoryFactory.java
  
  Index: DefaultRepositoryFactory.java
  ===================================================================
  RCS file: /home/cvs/avalon-sandbox/repository/impl/src/java/org/apache/avalon/repository/impl/DefaultRepositoryFactory.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultRepositoryFactory.java	18 Nov 2003 05:45:35 -0000	1.7
  +++ DefaultRepositoryFactory.java	18 Nov 2003 07:36:57 -0000	1.8
  @@ -53,6 +53,7 @@
   
   import java.io.File ;
   import java.io.IOException;
  +import java.io.InputStream;
   
   import java.util.Properties ;
   import java.net.Authenticator ;
  @@ -127,8 +128,19 @@
           
           try
           {
  -            l_bootstrap.load( DefaultRepositoryFactory.class
  -                    .getResourceAsStream( DEFAULTS ) ) ;
  +            InputStream input = DefaultRepositoryFactory.class
  +                    .getResourceAsStream( DEFAULTS );
  +            if( input == null )
  +            {
  +                final String error = 
  +                  "Internal error, unable to locate enbedded resource: " 
  +                  + DEFAULTS 
  +                  + " from the resource: " 
  +                  + DefaultRepositoryFactory.class.getProtectionDomain().getCodeSource().getLocation();
  +                throw new IllegalStateException( error );
  +            }
  +            l_bootstrap.load( input );
  +
           }
           catch ( IOException e )
           {
  
  
  

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


Mime
View raw message