Adding javac flag -XDallowInterceptTypes for javadoc

Erik Joelsson erik.joelsson at oracle.com
Thu Dec 6 01:48:15 PST 2012


I'm not sure what you are trying to do and have no idea what 
-XDallowIntersectionTypes means, but changing any makefiles in jdk/make 
will not affect the new build. The new build makefiles is found in 
jdk/makefiles. Most of the java classes are built in one single javac 
invocation, so adding the flag to only specific files is tricky.

/Erik

On 2012-12-06 06:26, Henry Jen wrote:
> Hi,
>
> I am trying to build TL repo which support intercept type cast, in order
> to make the build, I added
>
> OTHER_JAVACFLAGS += -XDallowIntersectionTypes
>
> to make/java/jave/Makefiles, which works for new build, but failed for
> old build in javadoc step.
>
> Would you please advise what would be the right approach to fix this for
> javadoc?
>
> Cheers,
> Henry
>
>
> /java/re/jdk/1.7.0/archive/fcs/binaries/linux-amd64/bin/java
> -XX:-PrintVMOptions -XX:+UnlockDiagnosticVMOptions -XX:-LogVMOutput
> -Xmx1024m -Xms512m -XX:PermSize=32m -XX:MaxPermSize=160m
> "-Xbootclasspath/p:/home/hjen/ws/tl/build/linux-amd64/langtools/dist/bootstrap/lib/javadoc.jar:/home/hjen/ws/tl/build/linux-amd64/langtools/dist/bootstrap/lib/javac.jar:/home/hjen/ws/tl/build/linux-amd64/langtools/dist/bootstrap/lib/doclets.jar"
> -jar
> /home/hjen/ws/tl/build/linux-amd64/langtools/dist/bootstrap/lib/javadoc.jar
> -bootclasspath "/home/hjen/ws/tl/build/linux-amd64/classes"  -d
> /home/hjen/ws/tl/build/linux-amd64/docs/api \
> 	  @/home/hjen/ws/tl/build/linux-amd64/tmp/docs/doctmp/coredocs.options
> @/home/hjen/ws/tl/build/linux-amd64/tmp/docs/doctmp/coredocs.packages
> ../../src/share/classes/java/util/Comparators.java:114: error:
> intersection types in cast are not supported in -source 1.8
>          return (Comparator<Map.Entry<K, V>>  &  Serializable)
>                                              ^
>    (use -source 8 or higher to enable default methods)
> 1 error



More information about the build-infra-dev mailing list