the bug is basically didn't set the input length long enough. How do we call this kind of bug, NPE?
"many problems with running javadoc stem from command lines that have become too long - even though the error message doesn't give the slightest hint this may be the problem. If you encounter problems with the task, try to set the useexternalfile attribute to true first." quote from apache about javadoc
When using apache ant, there is an issue when the command line input is too long, the program hangs, looks like is a bug in javadoc, ant has a work around to avoid this bug from causing issue which is having useexterfile set to true to write the command into temp file and execute the long command bit by bit.