diff --git a/docs/manual/OptionalTasks/sound.html b/docs/manual/OptionalTasks/sound.html index 1e3599772..da360a20b 100644 --- a/docs/manual/OptionalTasks/sound.html +++ b/docs/manual/OptionalTasks/sound.html @@ -19,12 +19,31 @@ for sound-files, so be sure you only have sound-files in the directory you specify.

Parameters

+

(none)

+ +

Nested Elements

+

success

+

Specifies the sound to be played if the build succeeded.

+

fail

+

Specifies the sound to be played if the build failed.

+ +

Nested Element Parameters

+

+The following attributes may be used on the <success> +and <fail> elements:

+ + + + +
Attribute Description Required
sourcethe path to a sound-file directory, or the name of a +specific sound-file, to be played. + Yes
loops the number of extra times to play the sound-file; @@ -40,26 +59,14 @@ directory you specify.

No
-

-To specify the sound-files or the sound-file directories, use the -nested <success> and <fail> -elements:

-
-
-<success>     the path to a sound-file directory, or the name of a
-              specific sound-file, to be played if the build succeeded.
-<fail>        the path to a sound-file directory, or the name of a
-              specific sound-file, to be played if the build succeeded.
-
-

Examples

 <target name="fun" if="fun" unless="fun.done">
-  <sound loops="2">
+  <sound>
     <success source="${user.home}/sounds/bell.wav"/>
-    <fail source="${user.home}/sounds/ohno.wav"/>
+    <fail source="${user.home}/sounds/ohno.wav" loops="2"/>
   </sound>
   <property name="fun.done" value="true"/>
 </target>
diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
index b5f090a3a..16ead587e 100644
--- a/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
+++ b/src/main/org/apache/tools/ant/taskdefs/optional/depend/Depend.java
@@ -327,6 +327,7 @@ public class Depend extends MatchingTask {
             // 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,14 +511,19 @@ public class Depend extends MatchingTask {
                     String className = (String)e.nextElement();
                     if (!outOfDateClasses.containsKey(className)) {
                         ClassFileInfo info = (ClassFileInfo)classFileInfoMap.get(className);
-                        Hashtable dependencies = (Hashtable)classpathDependencies.get(className);
-                        for (Enumeration e2 = dependencies.elements(); e2.hasMoreElements();) {
-                            File classpathFile = (File)e2.nextElement();
-                            if (classpathFile.lastModified() > info.absoluteFile.lastModified()) {
-                                log("Class " + 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();
+                                if (classpathFile.lastModified() > info.absoluteFile.lastModified()) {
+                                    log("Class " + className + 
                                     " is out of date with respect to " + classpathFile, Project.MSG_DEBUG);
-                                outOfDateClasses.put(className, className);
-                                break;
+                                    outOfDateClasses.put(className, className);
+                                    break;
+                                }
                             }
                         }
                     }