jesse 2003/05/01 13:37:40
Modified: proposal/xdocs/src/org/apache/ant/xdoclet IndexGen.java Log: Throw a BuildException if the root directory does not exist, instead of letting IndexGen NPE Revision Changes Path 1.2 +4 -0 ant/proposal/xdocs/src/org/apache/ant/xdoclet/IndexGen.java Index: IndexGen.java =================================================================== RCS file: /home/cvs/ant/proposal/xdocs/src/org/apache/ant/xdoclet/IndexGen.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- IndexGen.java 29 Apr 2003 19:42:00 -0000 1.1 +++ IndexGen.java 1 May 2003 20:37:40 -0000 1.2 @@ -81,6 +81,10 @@ 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>");