diff --git a/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java b/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java index 9c24dae70..64b3cf4fa 100644 --- a/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java +++ b/src/main/org/apache/tools/ant/util/depend/AbstractAnalyzer.java @@ -113,13 +113,11 @@ public abstract class AbstractAnalyzer implements DependencyAnalyzer { * which the root classes depend. * * @return an enumeration of File instances. - * @exception UnsupportedOperationException if the analyzer cannot - * determine file dependencies. */ - public Enumeration getFileDependencies() - throws UnsupportedOperationException { + public Enumeration getFileDependencies() { if (!supportsFileDependencies()) { - throw new UnsupportedOperationException(); + throw new RuntimeException("File dependencies are not supported " + + "by this analyzer"); } if (!determined) { determineDependencies(fileDependencies, classDependencies); diff --git a/src/main/org/apache/tools/ant/util/depend/DependencyAnalyzer.java b/src/main/org/apache/tools/ant/util/depend/DependencyAnalyzer.java index 04f827a7a..407484cdb 100644 --- a/src/main/org/apache/tools/ant/util/depend/DependencyAnalyzer.java +++ b/src/main/org/apache/tools/ant/util/depend/DependencyAnalyzer.java @@ -106,10 +106,8 @@ public interface DependencyAnalyzer { * which the root classes depend. * * @return an enumeration of File instances. - * @exception UnsupportedOperationException if the analyzer cannot - * determine file dependencies. */ - Enumeration getFileDependencies() throws UnsupportedOperationException; + Enumeration getFileDependencies(); /** * Get the list of classes upon which root classes depend. This is a