Browse Source

Throw a BuildException if the root directory does not exist, instead of letting IndexGen NPE

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274540 13f79535-47bb-0310-9956-ffa450edef68
master
Jesse Stockall 22 years ago
parent
commit
a511fb22e7
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      proposal/xdocs/src/org/apache/ant/xdoclet/IndexGen.java

+ 4
- 0
proposal/xdocs/src/org/apache/ant/xdoclet/IndexGen.java View File

@@ -81,6 +81,10 @@ public class IndexGen extends Task {

String[] categories = rootDir.list();

if (categories == null) {
throw new BuildException("Root directory \"" + rootDir.getPath() + "\" does not exist!", getLocation());
}

StringBuffer sb = new StringBuffer();
sb.append("<html><head><title>xdocs index</title></head>");
sb.append("<body>");


Loading…
Cancel
Save