You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bo...@apache.org on 2002/05/14 15:45:13 UTC
cvs commit: jakarta-ant/src/main/org/apache/tools/ant/types AbstractFileSet.java
bodewig 02/05/14 06:45:13
Modified: . Tag: ANT_15_BRANCH WHATSNEW
src/main/org/apache/tools/ant/taskdefs Tag: ANT_15_BRANCH
Javadoc.java
src/main/org/apache/tools/ant/types Tag: ANT_15_BRANCH
AbstractFileSet.java
Log:
unconditionally adding **/*.java to filesets nested into <javadoc> is
a little too much.
Revision Changes Path
No revision
No revision
1.263.2.16 +2 -0 jakarta-ant/WHATSNEW
Index: WHATSNEW
===================================================================
RCS file: /home/cvs/jakarta-ant/WHATSNEW,v
retrieving revision 1.263.2.15
retrieving revision 1.263.2.16
diff -u -r1.263.2.15 -r1.263.2.16
--- WHATSNEW 14 May 2002 06:21:44 -0000 1.263.2.15
+++ WHATSNEW 14 May 2002 13:45:12 -0000 1.263.2.16
@@ -47,6 +47,8 @@
* Using the doclet, docletpath or docletpathref attributes of
<javadoc> may have caused NullPointerExceptions.
+* nested <filesets> of <javadoc> would include too much.
+
Other changes:
--------------
No revision
No revision
1.96.2.4 +4 -1 jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java
Index: Javadoc.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/taskdefs/Javadoc.java,v
retrieving revision 1.96.2.3
retrieving revision 1.96.2.4
diff -u -r1.96.2.3 -r1.96.2.4
--- Javadoc.java 14 May 2002 06:21:44 -0000 1.96.2.3
+++ Javadoc.java 14 May 2002 13:45:12 -0000 1.96.2.4
@@ -1428,7 +1428,6 @@
* @since 1.5
*/
public void addFileset(FileSet fs) {
- fs.createInclude().setName("**/*.java");
fileSets.addElement(fs);
}
@@ -1790,6 +1789,10 @@
Enumeration enum = fileSets.elements();
while (enum.hasMoreElements()) {
FileSet fs = (FileSet) enum.nextElement();
+ if (!fs.hasPatterns() && !fs.hasSelectors()) {
+ fs = (FileSet) fs.clone();
+ fs.createInclude().setName("**/*.java");
+ }
File baseDir = fs.getDir(getProject());
DirectoryScanner ds = fs.getDirectoryScanner(getProject());
String[] files = ds.getIncludedFiles();
No revision
No revision
1.5.2.3 +21 -0 jakarta-ant/src/main/org/apache/tools/ant/types/AbstractFileSet.java
Index: AbstractFileSet.java
===================================================================
RCS file: /home/cvs/jakarta-ant/src/main/org/apache/tools/ant/types/AbstractFileSet.java,v
retrieving revision 1.5.2.2
retrieving revision 1.5.2.3
diff -u -r1.5.2.2 -r1.5.2.3
--- AbstractFileSet.java 10 May 2002 15:40:32 -0000 1.5.2.2
+++ AbstractFileSet.java 14 May 2002 13:45:13 -0000 1.5.2.3
@@ -402,6 +402,27 @@
}
/**
+ * Indicates whether there are any patterns here.
+ *
+ * @return whether any patterns are in this container
+ */
+ public boolean hasPatterns() {
+ if (defaultPatterns.hasPatterns()) {
+ return true;
+ }
+
+ Enumeration enum = additionalPatterns.elements();
+ while (enum.hasMoreElements()) {
+ PatternSet ps = (PatternSet) enum.nextElement();
+ if (ps.hasPatterns()) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ /**
* Gives the count of the number of selectors in this container
*
* @return the number of selectors in this container
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>