You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by la...@apache.org on 2001/09/09 23:53:26 UTC

cvs commit: jakarta-tomcat/src/share/org/apache/tomcat/util IntrospectionUtils.java

larryi      01/09/09 14:53:26

  Modified:    src/share/org/apache/tomcat/util IntrospectionUtils.java
  Log:
  To better support separate "install" and "home" directories, search for
  "install" before defaulting to "home".
  
  Revision  Changes    Path
  1.14      +9 -6      jakarta-tomcat/src/share/org/apache/tomcat/util/IntrospectionUtils.java
  
  Index: IntrospectionUtils.java
  ===================================================================
  RCS file: /home/cvs/jakarta-tomcat/src/share/org/apache/tomcat/util/IntrospectionUtils.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- IntrospectionUtils.java	2001/08/21 04:41:32	1.13
  +++ IntrospectionUtils.java	2001/09/09 21:53:26	1.14
  @@ -173,10 +173,6 @@
   		System.getProperties().put( homeSysProp, install );
   	    return install;
   	}
  -	if ( home != null ) {
  -	    System.getProperties().put( installSysProp, home );
  -	    return home;
  -	}
   
   	// Find the directory where jarName.jar is located
   	
  @@ -194,7 +190,7 @@
   		    install = f1.getCanonicalPath();
   		    if( installSysProp != null )
   			System.getProperties().put( installSysProp, install );
  -		    if( homeSysProp != null )
  +		    if( home == null && homeSysProp != null )
   			System.getProperties().put( homeSysProp, install );
   		    return install;
   		} catch( Exception ex ) {
  @@ -210,7 +206,7 @@
   			if( installSysProp != null )
   			    System.getProperties().put( installSysProp,
   							install );
  -			if( homeSysProp != null )
  +			if( home == null && homeSysProp != null )
   			    System.getProperties().put( homeSysProp, install );
   			return install;
   		    } catch( Exception ex ) {
  @@ -219,6 +215,13 @@
   		}
   	    }
   	}
  +
  +        // if install directory can't be found, use home as the default
  +	if ( home != null ) {
  +	    System.getProperties().put( installSysProp, home );
  +	    return home;
  +	}
  +
   	return null;
       }