6958836: javadoc should support -Xmaxerrs and -Xmaxwarns

Reviewed-by: darcy
This commit is contained in:
Jonathan Gibbons 2010-06-11 17:24:23 -07:00
parent 774e9847c4
commit f6a7442983
8 changed files with 295 additions and 33 deletions

View file

@ -155,10 +155,8 @@ public class DocletInvoker {
public boolean start(RootDoc root) {
Object retVal;
String methodName = "start";
Class<?>[] paramTypes = new Class<?>[1];
Object[] params = new Object[1];
paramTypes[0] = RootDoc.class;
params[0] = root;
Class<?>[] paramTypes = { RootDoc.class };
Object[] params = { root };
try {
retVal = invoke(methodName, null, paramTypes, params);
} catch (DocletInvokeException exc) {
@ -181,10 +179,8 @@ public class DocletInvoker {
public int optionLength(String option) {
Object retVal;
String methodName = "optionLength";
Class<?>[] paramTypes = new Class<?>[1];
Object[] params = new Object[1];
paramTypes[0] = option.getClass();
params[0] = option;
Class<?>[] paramTypes = { String.class };
Object[] params = { option };
try {
retVal = invoke(methodName, new Integer(0), paramTypes, params);
} catch (DocletInvokeException exc) {
@ -208,12 +204,8 @@ public class DocletInvoker {
String options[][] = optlist.toArray(new String[optlist.length()][]);
String methodName = "validOptions";
DocErrorReporter reporter = messager;
Class<?>[] paramTypes = new Class<?>[2];
Object[] params = new Object[2];
paramTypes[0] = options.getClass();
paramTypes[1] = DocErrorReporter.class;
params[0] = options;
params[1] = reporter;
Class<?>[] paramTypes = { String[][].class, DocErrorReporter.class };
Object[] params = { options, reporter };
try {
retVal = invoke(methodName, Boolean.TRUE, paramTypes, params);
} catch (DocletInvokeException exc) {