mbenson 2005/03/07 09:27:50 Modified: src/main/org/apache/tools/ant DirectoryScanner.java Log: Stop being so optimistic; move isDeeper() to 1.7 Add @return to contentsExcluded javadoc Remove unnecessary File.separator from endsWith comparison in contentsExcluded Revision Changes Path 1.97 +3 -2 ant/src/main/org/apache/tools/ant/DirectoryScanner.java Index: DirectoryScanner.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/DirectoryScanner.java,v retrieving revision 1.96 retrieving revision 1.97 diff -u -r1.96 -r1.97 --- DirectoryScanner.java 7 Mar 2005 17:16:33 -0000 1.96 +++ DirectoryScanner.java 7 Mar 2005 17:27:50 -0000 1.97 @@ -1179,7 +1179,7 @@ * @param pattern the pattern to check. * @param name the name to check. * @return whether the pattern is deeper than the name. - * @since Ant 1.6.3 + * @since Ant 1.7 */ private boolean isDeeper(String pattern, String name) { Vector p = SelectorUtils.tokenizePath(pattern); @@ -1216,12 +1216,13 @@ /** * Test whether all contents of the specified directory must be excluded. * @param name the directory name to check. + * @return whether all the specified directory's contents are excluded. */ private boolean contentsExcluded(String name) { name = (name.endsWith(File.separator)) ? name : name + File.separator; for (int i = 0; i < excludes.length; i++) { String e = excludes[i]; - if (e.endsWith(File.separator + "**") && SelectorUtils.matchPath( + if (e.endsWith("**") && SelectorUtils.matchPath( e.substring(0, e.length() - 2), name, isCaseSensitive())) { return true; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]