ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bode...@apache.org
Subject svn commit: r702901 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java src/tests/antunit/taskdefs/optional/depend/depend-test.xml
Date Wed, 08 Oct 2008 15:04:47 GMT
Author: bodewig
Date: Wed Oct  8 08:04:47 2008
New Revision: 702901

URL: http://svn.apache.org/viewvc?rev=702901&view=rev
Log:
don't delete classes if the source is not there.  PR 45916

Modified:
    ant/core/trunk/WHATSNEW
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
    ant/core/trunk/src/tests/antunit/taskdefs/optional/depend/depend-test.xml

Modified: ant/core/trunk/WHATSNEW
URL: http://svn.apache.org/viewvc/ant/core/trunk/WHATSNEW?rev=702901&r1=702900&r2=702901&view=diff
==============================================================================
--- ant/core/trunk/WHATSNEW (original)
+++ ant/core/trunk/WHATSNEW Wed Oct  8 08:04:47 2008
@@ -232,6 +232,10 @@
  * <depend> didn't close JARs that were part of the classpath.
    Bugzilla Report 45955.
 
+ * in some cases <depend> would delete class files even if it didn't
+   find the corresponding source files.
+   Bugzilla Report 45916.
+
 Other changes:
 --------------
 

Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java?rev=702901&r1=702900&r2=702901&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java Wed
Oct  8 08:04:47 2008
@@ -451,8 +451,12 @@
             ClassFileInfo classInfo
                 = (ClassFileInfo) classFileInfoMap.get(className);
             if (classInfo != null && classInfo.absoluteFile.exists()) {
+                if (classInfo.sourceFile == null) {
+                    warnOutOfDateButNotDeleted(classInfo, className, className);
+                } else {
                 classInfo.absoluteFile.delete();
                 count++;
+                }
             }
         }
         return count;

Modified: ant/core/trunk/src/tests/antunit/taskdefs/optional/depend/depend-test.xml
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/tests/antunit/taskdefs/optional/depend/depend-test.xml?rev=702901&r1=702900&r2=702901&view=diff
==============================================================================
--- ant/core/trunk/src/tests/antunit/taskdefs/optional/depend/depend-test.xml (original)
+++ ant/core/trunk/src/tests/antunit/taskdefs/optional/depend/depend-test.xml Wed Oct  8 08:04:47
2008
@@ -24,7 +24,7 @@
     <delete dir="${src1}"/>
   </target>
 
-  <target name="xtestBug45916">
+  <target name="testBug45916">
     <mkdir dir="${src1}"/>
     <mkdir dir="${output}"/>
     <mkdir dir="${src1}/a"/>



Mime
View raw message