only **/*.java as the documentation claims and earlier revisions did. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@491150 13f79535-47bb-0310-9956-ffa450edef68master
@@ -6,6 +6,11 @@ Changes that could break older environments: | |||||
Fixed bugs: | Fixed bugs: | ||||
----------- | ----------- | ||||
* In Ant 1.7.0, <fileset> in <javadoc> does not by default include only | |||||
**/*.java as the documentation claims and earlier revisions did. | |||||
Bugzilla report 41264. | |||||
* SPI support in jar was broken. | * SPI support in jar was broken. | ||||
Bugzilla report 41201. | Bugzilla report 41201. | ||||
@@ -139,4 +139,16 @@ | |||||
<fileset refid="fileset.simple" /> | <fileset refid="fileset.simple" /> | ||||
</javadoc> | </javadoc> | ||||
</target> | </target> | ||||
<target name="nonJavaIncludes"> | |||||
<delete dir="${javadoc}"/> | |||||
<mkdir dir="${javadoc}"/> | |||||
<echo file="${javadoc}/stuff1.java">public class stuff1 {}</echo> | |||||
<echo file="${javadoc}/stuff2.java">public class stuff2 {}</echo> | |||||
<echo file="${javadoc}/stuff.properties">x=4</echo> | |||||
<javadoc destdir="${javadoc}" failonerror="true"> | |||||
<fileset dir="${javadoc}"/> | |||||
</javadoc> | |||||
</target> | |||||
</project> | </project> |
@@ -2199,11 +2199,12 @@ public class Javadoc extends Task { | |||||
if (rc instanceof FileSet) { | if (rc instanceof FileSet) { | ||||
FileSet fs = (FileSet) rc; | FileSet fs = (FileSet) rc; | ||||
if (!fs.hasPatterns() && !fs.hasSelectors()) { | if (!fs.hasPatterns() && !fs.hasSelectors()) { | ||||
fs = (FileSet) fs.clone(); | |||||
fs.createInclude().setName("**/*.java"); | |||||
FileSet fs2 = (FileSet) fs.clone(); | |||||
fs2.createInclude().setName("**/*.java"); | |||||
if (includeNoSourcePackages) { | if (includeNoSourcePackages) { | ||||
fs.createInclude().setName("**/package.html"); | |||||
fs2.createInclude().setName("**/package.html"); | |||||
} | } | ||||
rc = fs2; | |||||
} | } | ||||
} | } | ||||
Iterator iter = rc.iterator(); | Iterator iter = rc.iterator(); | ||||
@@ -131,4 +131,9 @@ public class JavadocTest extends BuildFileTest { | |||||
public void testDoublyNestedFilesetNoPatterns() throws Exception { | public void testDoublyNestedFilesetNoPatterns() throws Exception { | ||||
executeTarget("doublyNestedFilesetNoPatterns"); | executeTarget("doublyNestedFilesetNoPatterns"); | ||||
} | } | ||||
public void testNonJavaIncludes() throws Exception { // #41264 | |||||
executeTarget("nonJavaIncludes"); | |||||
} | |||||
} | } |