You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by jg...@apache.org on 2005/12/28 01:06:02 UTC

svn commit: r359327 - /ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

Author: jglick
Date: Tue Dec 27 16:06:00 2005
New Revision: 359327

URL: http://svn.apache.org/viewcvs?rev=359327&view=rev
Log:
More helpful error message.

Modified:
    ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java

Modified: ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java
URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java?rev=359327&r1=359326&r2=359327&view=diff
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java (original)
+++ ant/core/trunk/src/main/org/apache/tools/ant/DirectoryScanner.java Tue Dec 27 16:06:00 2005
@@ -1312,7 +1312,7 @@
      */
     public synchronized String[] getIncludedFiles() {
         if (filesIncluded == null) {
-            throw new IllegalStateException();
+            throw new IllegalStateException("Must call scan() first");
         }
         String[] files = new String[filesIncluded.size()];
         filesIncluded.copyInto(files);
@@ -1327,7 +1327,7 @@
      */
     public synchronized int getIncludedFilesCount() {
         if (filesIncluded == null) {
-            throw new IllegalStateException();
+            throw new IllegalStateException("Must call scan() first");
         }
         return filesIncluded.size();
     }
@@ -1395,7 +1395,7 @@
      */
     public synchronized String[] getIncludedDirectories() {
         if (dirsIncluded == null) {
-            throw new IllegalStateException();
+            throw new IllegalStateException("Must call scan() first");
         }
         String[] directories = new String[dirsIncluded.size()];
         dirsIncluded.copyInto(directories);
@@ -1410,7 +1410,7 @@
      */
     public synchronized int getIncludedDirsCount() {
         if (dirsIncluded == null) {
-            throw new IllegalStateException();
+            throw new IllegalStateException("Must call scan() first");
         }
         return dirsIncluded.size();
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org