From jonathan.gibbons at oracle.com Wed Feb 25 22:36:51 2015 From: jonathan.gibbons at oracle.com (Jonathan Gibbons) Date: Wed, 25 Feb 2015 14:36:51 -0800 Subject: Javadoc cross-compilation problem In-Reply-To: <5357D0CC.4000306@oracle.com> References: <5357CF4E.2070306@oracle.com> <5357D0CC.4000306@oracle.com> Message-ID: <54EE4E83.4000607@oracle.com> Finally pushed. -- Jon On 04/23/2014 07:40 AM, Jonathan Gibbons wrote: > Filed as JDK-8041628 > > https://bugs.openjdk.java.net/browse/JDK-8041628 > > -- Jon > > On 04/23/2014 07:33 AM, Jonathan Gibbons wrote: >> Hmmm. That sounds like a bug. Thanks for the report and the detailed >> analysis. >> >> -- Jon >> >> On 04/23/2014 06:09 AM, Gilles Duboscq wrote: >>> Hello, >>> >>> When using jdk8 to generate javadoc for a 7 source base (some >>> paths/arguments replaced by ...): >>> >>> javadoc -J-Xmx2g -XDignore.symbol.file -classpath ... -quiet -d ... >>> -overview .../overview.html -sourcepath ... -source 1.7 -bootclasspath >>> /usr/java/jdk1.7.0_51/jre/lib/resources.jar:/usr/java/jdk1.7.0_51/jre/lib/rt.jar:/usr/java/jdk1.7.0_51/jre/lib/jsse.jar:/usr/java/jdk1.7.0_51/jre/lib/jce.jar:/usr/java/jdk1.7.0_51/jre/lib/charsets.jar:/usr/java/jdk1.7.0_51/jre/lib/jfr.jar >>> >>> -extdirs /usr/java/jdk1.7.0_51/jre/lib/ext -tag test:X -tag run:X -tag >>> bug:X -tag summary:X -tag vmoption:X -XDignore.symbol.file >>> -windowtitle '...' ... >>> >>> I get the following error: >>> >>> javadoc: error - >>> com.sun.tools.doclets.internal.toolkit.util.DocletAbortException: >>> com.sun.tools.javac.code.Symbol$CompletionFailure: class file for >>> java.lang.FunctionalInterface not found >>> >>> The same sources compile fine on jdk7 and also generate javadoc fine >>> on jdk7. They also compile fine on jdk8 when setting -source 1.7, >>> -bootclasspath and -extdirs. >>> >>> I think the error is caused by the implementation of >>> RootDocImpl.isFunctionalInterface which calls toString on >>> env.syms.functionalInterfaceType which in turn calls >>> ClassType.getTypeArguments which calls complete(). >>> >>> I tried to fix this by checking for env.source.allowLambda() before >>> doing the String comparison [1] and this fixed my problem. I tried >>> running javadoc on some other 8 and 7 source bases and didn't see any >>> problem with this patch. >>> >>> Regards, >>> -Gilles >>> >>> [1] http://cr.openjdk.java.net/~gdub/x-comp.patch >> > From duboscq at ssw.jku.at Wed Feb 25 23:19:05 2015 From: duboscq at ssw.jku.at (Gilles Duboscq) Date: Wed, 25 Feb 2015 23:19:05 -0000 Subject: Javadoc cross-compilation problem References: <5357CF4E.2070306@oracle.com> <5357D0CC.4000306@oracle.com> <54EE4E83.4000607@oracle.com> Message-ID: Thanks. ? Gilles On Wed Feb 25 2015 at 11:37:59 PM Jonathan Gibbons < jonathan.gibbons at oracle.com> wrote: > Finally pushed. > > -- Jon > > On 04/23/2014 07:40 AM, Jonathan Gibbons wrote: > > Filed as JDK-8041628 > > > > https://bugs.openjdk.java.net/browse/JDK-8041628 > > > > -- Jon > > > > On 04/23/2014 07:33 AM, Jonathan Gibbons wrote: > >> Hmmm. That sounds like a bug. Thanks for the report and the detailed > >> analysis. > >> > >> -- Jon > >> > >> On 04/23/2014 06:09 AM, Gilles Duboscq wrote: > >>> Hello, > >>> > >>> When using jdk8 to generate javadoc for a 7 source base (some > >>> paths/arguments replaced by ...): > >>> > >>> javadoc -J-Xmx2g -XDignore.symbol.file -classpath ... -quiet -d ... > >>> -overview .../overview.html -sourcepath ... -source 1.7 -bootclasspath > >>> /usr/java/jdk1.7.0_51/jre/lib/resources.jar:/usr/java/jdk1. > 7.0_51/jre/lib/rt.jar:/usr/java/jdk1.7.0_51/jre/lib/jsse. > jar:/usr/java/jdk1.7.0_51/jre/lib/jce.jar:/usr/java/jdk1.7. > 0_51/jre/lib/charsets.jar:/usr/java/jdk1.7.0_51/jre/lib/jfr.jar > >>> > >>> -extdirs /usr/java/jdk1.7.0_51/jre/lib/ext -tag test:X -tag run:X -tag > >>> bug:X -tag summary:X -tag vmoption:X -XDignore.symbol.file > >>> -windowtitle '...' ... > >>> > >>> I get the following error: > >>> > >>> javadoc: error - > >>> com.sun.tools.doclets.internal.toolkit.util.DocletAbortException: > >>> com.sun.tools.javac.code.Symbol$CompletionFailure: class file for > >>> java.lang.FunctionalInterface not found > >>> > >>> The same sources compile fine on jdk7 and also generate javadoc fine > >>> on jdk7. They also compile fine on jdk8 when setting -source 1.7, > >>> -bootclasspath and -extdirs. > >>> > >>> I think the error is caused by the implementation of > >>> RootDocImpl.isFunctionalInterface which calls toString on > >>> env.syms.functionalInterfaceType which in turn calls > >>> ClassType.getTypeArguments which calls complete(). > >>> > >>> I tried to fix this by checking for env.source.allowLambda() before > >>> doing the String comparison [1] and this fixed my problem. I tried > >>> running javadoc on some other 8 and 7 source bases and didn't see any > >>> problem with this patch. > >>> > >>> Regards, > >>> -Gilles > >>> > >>> [1] http://cr.openjdk.java.net/~gdub/x-comp.patch > >> > > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: