RFR: 8152818: Javadoc must support module options supported by javac.

Martin Buchholz martinrb at google.com
Sat Apr 16 23:33:40 UTC 2016


One more non-gripe!
If I leave the references to sun.misc.Unsafe (instead of the
jdk.internal variant) I get:

java/util/concurrent/atomic/AtomicLong.java:28: error: package
sun.misc does not exist
    private static final sun.misc.Unsafe U = sun.misc.Unsafe.getUnsafe();

But I notice that the architected
  -XaddReads:java.base=jdk.unsupported \
succeeds in removing it.

#!/bin/bash
set -eu
JDKSRC=/home/martin/ws/jdk9-dev
JDK=$JDKSRC/build/linux-x86_64-normal-server-release/images/jdk
DIR=bug5
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)~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 \
  -XaddReads:java.base=jdk.unsupported \
  -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