# HG changeset patch # User jjg # Date 1222903593 25200 # Node ID d7fc53d645602e49430d58ae073754d968dd5301 # Parent 63a59b0dc7fb2008c2355164f046dd3c35f1c8a9 6748601: javadoc API should allow varargs use Reviewed-by: bpatel diff -r 63a59b0dc7fb -r d7fc53d64560 langtools/src/share/classes/com/sun/tools/javadoc/Main.java --- a/langtools/src/share/classes/com/sun/tools/javadoc/Main.java Mon Sep 29 22:11:26 2008 -0700 +++ b/langtools/src/share/classes/com/sun/tools/javadoc/Main.java Wed Oct 01 16:26:33 2008 -0700 @@ -45,7 +45,7 @@ * Command line interface. * @param args The command line parameters. */ - public static void main(String[] args) { + public static void main(String... args) { System.exit(execute(args)); } @@ -54,7 +54,7 @@ * @param args The command line parameters. * @return The return code. */ - public static int execute(String[] args) { + public static int execute(String... args) { Start jdoc = new Start(); return jdoc.begin(args); } @@ -65,7 +65,7 @@ * @param args The command line parameters. * @return The return code. */ - public static int execute(String programName, String[] args) { + public static int execute(String programName, String... args) { Start jdoc = new Start(programName); return jdoc.begin(args); } @@ -79,7 +79,7 @@ */ public static int execute(String programName, String defaultDocletClassName, - String[] args) { + String... args) { Start jdoc = new Start(programName, defaultDocletClassName); return jdoc.begin(args); } @@ -99,7 +99,7 @@ PrintWriter warnWriter, PrintWriter noticeWriter, String defaultDocletClassName, - String[] args) { + String... args) { Start jdoc = new Start(programName, errWriter, warnWriter, noticeWriter, defaultDocletClassName); diff -r 63a59b0dc7fb -r d7fc53d64560 langtools/src/share/classes/com/sun/tools/javadoc/Start.java --- a/langtools/src/share/classes/com/sun/tools/javadoc/Start.java Mon Sep 29 22:11:26 2008 -0700 +++ b/langtools/src/share/classes/com/sun/tools/javadoc/Start.java Wed Oct 01 16:26:33 2008 -0700 @@ -28,17 +28,11 @@ import com.sun.javadoc.*; import com.sun.tools.javac.main.CommandLine; -import com.sun.tools.javac.main.JavaCompiler; import com.sun.tools.javac.util.Context; import com.sun.tools.javac.util.List; import com.sun.tools.javac.util.ListBuffer; import com.sun.tools.javac.util.Options; -import com.sun.tools.javadoc.Messager; -import com.sun.tools.javadoc.DocletInvoker; -import com.sun.tools.javadoc.RootDocImpl; -import com.sun.tools.javadoc.ModifierFilter; - import java.io.IOException; import java.io.File; import java.io.FileNotFoundException; @@ -139,7 +133,7 @@ /** * Main program - external wrapper */ - int begin(String argv[]) { + int begin(String... argv) { boolean failed = false; try { @@ -178,7 +172,7 @@ /** * Main program - internal */ - private boolean parseAndExecute(String argv[]) throws IOException { + private boolean parseAndExecute(String... argv) throws IOException { long tm = System.currentTimeMillis(); ListBuffer javaNames = new ListBuffer();