File tree Expand file tree Collapse file tree
test/langtools/jdk/javadoc/taglet Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121 * questions.
2222 */
2323
24- package javadoc .tester ;
25-
2624import java .io .IOException ;
2725import java .nio .file .Files ;
2826import java .nio .file .Path ;
27+ import java .util .stream .Stream ;
2928
3029import toolbox .JavacTask ;
3130import toolbox .ToolBox ;
3231
33- /// Utilities to build the JDK taglets.
32+ /// Utilities to build the JDK-specific taglets.
33+ /// This guy uses JavacTask so can't be in javadoc.tester.
3434public final class JdkTaglets {
3535
3636 /// Build a taglet and return its path for `-tagletpath`.
37- public static Path buildTaglet (ToolBox tb , Path base , String tagletFile ) throws IOException {
37+ public static Path build (ToolBox tb , Path base , String ... tagletFiles ) throws IOException {
3838 Path tagletOutDir = base .resolve ("taglet" );
39+ Files .deleteIfExists (tagletOutDir );
3940 Files .createDirectories (tagletOutDir );
4041 Path tagletRoot = tb .findFromTestRoot ("../../make/jdk/src/classes/build/tools/taglet" );
42+
4143 new JavacTask (tb )
42- .files (tagletRoot .resolve (tagletFile + ".java" ))
44+ .files (Stream .of (tagletFiles )
45+ .map (tagletFile -> tagletRoot .resolve (tagletFile + ".java" ))
46+ .toArray (Path []::new ))
4347 .outdir (tagletOutDir )
4448 .run (JavacTask .Expect .SUCCESS );
4549 return tagletOutDir ;
4650 }
51+
52+ private JdkTaglets () {}
4753}
Original file line number Diff line number Diff line change 2525 * @test
2626 * @summary General tests for SealedGraph block tag
2727 * @bug 8380913
28- * @library /tools/lib /jdk/javadoc/lib
28+ * @library /tools/lib /jdk/javadoc/lib ../
2929 * @modules jdk.compiler/com.sun.tools.javac.api
3030 * jdk.compiler/com.sun.tools.javac.main
3131 * jdk.javadoc/jdk.javadoc.internal.tool
3737
3838import builder .ClassBuilder ;
3939import javadoc .tester .JavadocTester ;
40- import javadoc .tester .JdkTaglets ;
4140import toolbox .ToolBox ;
4241
4342public class TestSealedTaglet extends JavadocTester {
@@ -55,7 +54,7 @@ public static void main(String... args) throws Exception {
5554
5655 @ Test
5756 public void testInvisibleInMiddle (Path base ) throws Exception {
58- var builtTaglet = JdkTaglets .buildTaglet (tb , base , "SealedGraph" );
57+ var builtTaglet = JdkTaglets .build (tb , base , "SealedGraph" );
5958
6059 Path srcDir = base .resolve ("src" );
6160 Path outDir = base .resolve ("out" );
You can’t perform that action at this time.
0 commit comments