RFR: 8152818: Javadoc must support module options supported by javac.
Martin Buchholz
martinrb at google.com
Sat Apr 16 23:12:58 UTC 2016
A final and successful (but disappointing) experiment.
Copying the JDK sources, deleting the module-info.java file and using
the traditional -sourcepath flag with that brings success.
It's disappointing because it's clearly an ugly hack and retreating to
a pre-jigsaw world (but -Xmodule:java.base works!)
We get annoying warnings from files that are not involved in this compilation,
sourcepath/java/util/GregorianCalendar.java:3231: warning: no @throws
for java.lang.ClassNotFoundException
private void readObject(ObjectInputStream stream)
but that seems like a pre-existing BUG (jdk8 has it too)
(why, oh why, is javadoc wasting its time analyzing GregorianCalendar.java?)
#!/bin/bash
set -eu
JDKSRC=/home/martin/ws/jdk9-dev
JDK=$JDKSRC/build/linux-x86_64-normal-server-release/images/jdk
DIR=bug4
rm -rf $DIR
cvs -Q -d ':pserver:anonymous:@gee.cs.oswego.edu/home/jsr166/jsr166'
checkout -d $DIR jsr166/src/main
cd $DIR
find -name '*.java' |
xargs perl -0777 -pi -e 's~sun\.(reflect|misc)~jdk.internal.$1~g'
rsync -a "$JDKSRC/jdk/src/java.base/share/classes/" sourcepath/
rm sourcepath/module-info.java
exec $JDK/bin/javadoc \
-d docs \
-Xdoclint:all \
-Xmodule:java.base \
-sourcepath "sourcepath" \
-Xdocrootparent http://docs.oracle.com/javase/9/docs \
-tag 'jls:a:See <cite> The Java™ Language Specification</cite>:' \
-tag 'implSpec:a:Implementation Requirements:' \
-tag 'implNote:a:Implementation Note:' \
$(find java -name '*.java')
More information about the javadoc-dev
mailing list