ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend Depend.java
Date Wed, 03 Jan 2001 12:49:18 GMT
bodewig     01/01/03 04:49:17

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/depend
                        Depend.java
  Log:
  Fixed some typos, avoid NullPointerException when dependency cache and
  actually existing class files have run out of sync (would try to
  access information about a non-existent class file).
  
  Revision  Changes    Path
  1.3       +4 -3      jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
  
  Index: Depend.java
  ===================================================================
  RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- Depend.java	2000/11/15 16:01:02	1.2
  +++ Depend.java	2001/01/03 12:49:17	1.3
  @@ -168,7 +168,7 @@
                   File depFile = new File(cache, info.relativeName + ".dep");
                   if (depFile.exists() && depFile.lastModified() > info.absoluteFile.lastModified())
{
                       // depFile exists and is newer than the class file
  -                    // need to read dependency list from tyhe file.
  +                    // need to read dependency list from the file.
                       dependencyList = readDependencyList(depFile);
                   }
               }
  @@ -235,7 +235,7 @@
                           deleteAffectedFiles(affectedClassName);
                       }
                       else {
  -                        // without closer we may delete an inner class but not the
  +                        // without closure we may delete an inner class but not the
                           // top level class which will not trigger a recompile.
                              
                           if (affectedClassName.indexOf("$") != -1) {
  @@ -245,7 +245,8 @@
                               log("Top level class = " + topLevelClassName, Project.MSG_INFO);
                               ClassFileInfo topLevelClassInfo 
                                   = (ClassFileInfo)classFileInfoMap.get(topLevelClassName);
  -                            if (topLevelClassInfo.absoluteFile.exists()) {
  +                            if (topLevelClassInfo != null &&
  +                                topLevelClassInfo.absoluteFile.exists()) {
                                   log("Deleting file " + topLevelClassInfo.absoluteFile.getPath()
+ " since " + 
                                       "one of its inner classes was removed", Project.MSG_VERBOSE);
                                   topLevelClassInfo.absoluteFile.delete();
  
  
  

Mime
View raw message