ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From co...@apache.org
Subject cvs commit: jakarta-ant/src/main/org/apache/tools/ant/taskdefs/optional/depend Depend.java
Date Mon, 08 Oct 2001 15:47:07 GMT
conor       01/10/08 08:47:07

  Modified:    src/main/org/apache/tools/ant/taskdefs/optional/depend Tag:
                        ANT_14_BRANCH Depend.java
  Log:
  Fix up situations when a class has been deleted already but we still
  have cached dependency info.
  
  PR:	3958
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.8.2.3   +13 -7     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.8.2.2
  retrieving revision 1.8.2.3
  diff -u -w -u -r1.8.2.2 -r1.8.2.3
  --- Depend.java	2001/09/12 14:19:55	1.8.2.2
  +++ Depend.java	2001/10/08 15:47:06	1.8.2.3
  @@ -327,6 +327,7 @@
               // now determine which jars each class depends upon
               classpathDependencies = new Hashtable();
               AntClassLoader loader = new AntClassLoader(getProject(), dependClasspath);
  +            
               Hashtable classpathFileCache = new Hashtable();
               Object nullFileMarker = new Object();
               for (Enumeration e = dependencyMap.keys(); e.hasMoreElements();) {
  @@ -510,6 +511,10 @@
                       String className = (String)e.nextElement();
                       if (!outOfDateClasses.containsKey(className)) {
                           ClassFileInfo info = (ClassFileInfo)classFileInfoMap.get(className);
  +                        
  +                        // if we have no info about the class - it may have been deleted
already and we 
  +                        // are using cached info.
  +                        if (info != null) {
                           Hashtable dependencies = (Hashtable)classpathDependencies.get(className);
                           for (Enumeration e2 = dependencies.elements(); e2.hasMoreElements();)
{
                               File classpathFile = (File)e2.nextElement();
  @@ -518,6 +523,7 @@
                                       " is out of date with respect to " + classpathFile,
Project.MSG_DEBUG);
                                   outOfDateClasses.put(className, className);
                                   break;
  +                                }
                               }
                           }
                       }
  
  
  

Mime
View raw message