avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcconn...@apache.org
Subject cvs commit: avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl DefaultCriteria.java
Date Sun, 14 Dec 2003 10:54:50 GMT
mcconnell    2003/12/14 02:54:50

  Modified:    merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl
                        DefaultCriteria.java
  Log:
  Correct bug in directory resolution.
  
  Revision  Changes    Path
  1.8       +11 -9     avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java
  
  Index: DefaultCriteria.java
  ===================================================================
  RCS file: /home/cvs/avalon/merlin/kernel/impl/src/java/org/apache/avalon/merlin/impl/DefaultCriteria.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- DefaultCriteria.java	13 Dec 2003 18:25:54 -0000	1.7
  +++ DefaultCriteria.java	14 Dec 2003 10:54:50 -0000	1.8
  @@ -109,35 +109,35 @@
   
       private static File getAvalonHomeDirectory()
       {
  -        return getEnvironment( "AVALON_HOME", ".avalon" );
  +        return getEnvironment( "AVALON_HOME", "avalon.home", ".avalon" );
       }
   
       private static File getMerlinHomeDirectory()
       {
  -        return getEnvironment( "MERLIN_HOME", ".merlin" );
  +        return getEnvironment( "MERLIN_HOME", "merlin.home", ".merlin" );
       }
   
  -    private static File getEnvironment( String symbol, String path )
  +    private static File getEnvironment( String symbol, String key, String path )
       {
           try
           {
               String home = 
  -              System.getProperty( 
  -                "merlin.home", 
  -                Env.getEnvVariable( "MERLIN_HOME" ) );
  +              System.getProperty( key, Env.getEnvVariable( symbol ) );
   
               if( null != home ) return new File( home ).getCanonicalFile();
   
               return new File(
                 System.getProperty( "user.home" ) 
                 + File.separator 
  -              + ".merlin" ).getCanonicalFile();
  +              + path ).getCanonicalFile();
   
           }
           catch( Throwable e )
           {
               final String error = 
  -              "Internal error while attempting to access MERLIN_HOME environment variable.";
  +              "Internal error while attempting to access symbol [" 
  +              + symbol 
  +              + "] environment variable.";
               final String message = 
                 ExceptionHelper.packException( error, e, true );
               throw new RuntimeException( message );
  @@ -279,6 +279,8 @@
           Defaults defaults = 
             new Defaults( 
                Parameter.getKeys( super.getParameters() ), new String[0], finders );
  +
  +        printProperties( defaults, "defaults" );
   
           //
           // add ${merlin.dir} to assist in synbol expansion then expand
  
  
  

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


Mime
View raw message