portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tay...@apache.org
Subject cvs commit: jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components AbstractComponentAwareTestCase.java
Date Thu, 25 Mar 2004 00:41:30 GMT
taylor      2004/03/24 16:41:30

  Modified:    components/cm/src/java/org/apache/jetspeed/components
                        AbstractComponentAwareTestCase.java
  Log:
  fixed NPE in test case
  
  Revision  Changes    Path
  1.6       +10 -6     jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/AbstractComponentAwareTestCase.java
  
  Index: AbstractComponentAwareTestCase.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/components/cm/src/java/org/apache/jetspeed/components/AbstractComponentAwareTestCase.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- AbstractComponentAwareTestCase.java	3 Mar 2004 03:26:17 -0000	1.5
  +++ AbstractComponentAwareTestCase.java	25 Mar 2004 00:41:30 -0000	1.6
  @@ -97,12 +97,16 @@
           Properties p = new Properties();
           try
           {
  -            File baseDir = new File(System.getProperty("basedir"));
  -            if(baseDir.exists())
  +            String base = System.getProperty("basedir");
  +            if (base != null)
               {
  -                System.out.println("Finding logfile from basedir " + baseDir);
  -                File logFile = new File(baseDir, log4jFile);
  -                p.load(new FileInputStream(logFile));
  +                File baseDir = new File(base);
  +                if(baseDir.exists())
  +                {
  +                    System.out.println("Finding logfile from basedir " + baseDir);
  +                    File logFile = new File(baseDir, log4jFile);
  +                    p.load(new FileInputStream(logFile));
  +                }
               }
           }
           catch (Exception e)
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message