javadoc ignores -XD-Xmaxerrs

Jonathan Gibbons jonathan.gibbons at oracle.com
Fri Jun 4 18:27:50 PDT 2010


On 06/04/2010 06:07 PM, Martin Buchholz wrote:
> Hi javadoc team,
>
> This is a bug report with proposed fix.
>
> We have reason to believe that javadoc was designed
> to accept javac flags like -Xmaxerrs via
>
> javadoc -XD-Xmaxerrs=NNNN ....
>
> However,
>
> this is not documented, except via 'javac -X'
> javadoc should also really have a -X flag
> that documents its "nonstandard" -Xxxx flags.
>
> The -XD-Xmaxerrs=NNNN flag is not recognized
> because the Messager in
> src/share/classes/com/sun/tools/javadoc/Start.java
> is created before the options are parsed.
>
> Here's a fix that works for us, but it seems likely that
> there is an architecturally cleaner fix:
>
> http://cr.openjdk.java.net/~martin/webrevs/openjdk7/javadoc-Xmaxerrs/
>
> Martin
>    

Martin,

Thanks for the basic fix.   -XD is not supposed to be documented, either 
for javac or javadoc.
I think it would be worth giving javadoc explicit -Xmaxerrs and 
-Xmaxwarns options, rather
than tunnelling them through -XD.   Doing so would still suffer from the 
basic order of
initialization problem that you have discovered and fixed here, so it 
would be a natural
extension to your fix. Filed as CR 6958836.

-- Jon

P.S.

What's with the indent level of 2? :-)



More information about the compiler-dev mailing list