git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@702901 13f79535-47bb-0310-9956-ffa450edef68master
| @@ -232,6 +232,10 @@ Fixed bugs: | |||||
| * <depend> didn't close JARs that were part of the classpath. | * <depend> didn't close JARs that were part of the classpath. | ||||
| Bugzilla Report 45955. | 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: | Other changes: | ||||
| -------------- | -------------- | ||||
| @@ -451,8 +451,12 @@ public class Depend extends MatchingTask { | |||||
| ClassFileInfo classInfo | ClassFileInfo classInfo | ||||
| = (ClassFileInfo) classFileInfoMap.get(className); | = (ClassFileInfo) classFileInfoMap.get(className); | ||||
| if (classInfo != null && classInfo.absoluteFile.exists()) { | if (classInfo != null && classInfo.absoluteFile.exists()) { | ||||
| if (classInfo.sourceFile == null) { | |||||
| warnOutOfDateButNotDeleted(classInfo, className, className); | |||||
| } else { | |||||
| classInfo.absoluteFile.delete(); | classInfo.absoluteFile.delete(); | ||||
| count++; | count++; | ||||
| } | |||||
| } | } | ||||
| } | } | ||||
| return count; | return count; | ||||
| @@ -24,7 +24,7 @@ | |||||
| <delete dir="${src1}"/> | <delete dir="${src1}"/> | ||||
| </target> | </target> | ||||
| <target name="xtestBug45916"> | |||||
| <target name="testBug45916"> | |||||
| <mkdir dir="${src1}"/> | <mkdir dir="${src1}"/> | ||||
| <mkdir dir="${output}"/> | <mkdir dir="${output}"/> | ||||
| <mkdir dir="${src1}/a"/> | <mkdir dir="${src1}/a"/> | ||||