FULL PRODUCT VERSION :
java version "9.0.4"
Java(TM) SE Runtime Environment (build 9.0.4+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.4+11, mixed mode)
ADDITIONAL OS VERSION INFORMATION :
Darwin dphillips-mbp 17.4.0 Darwin Kernel Version 17.4.0: Sun Dec 17 09:19:54 PST 2017; root:xnu-4570.41.2~1/RELEASE_X86_64 x86_64
A DESCRIPTION OF THE PROBLEM :
Javadoc fails for a valid class file that was compiled with javac:
An internal exception has occurred.
(com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: /Users/dphillips/src/presto/presto-hive/target/presto-hive-0.195-SNAPSHOT.jar(/com/facebook/presto/hive/HiveSplitManager$1.class)
undeclared type variable: T
REGRESSION. Last worked in version 8u162
ADDITIONAL REGRESSION INFORMATION:
java version "1.8.0_162"
Java(TM) SE Runtime Environment (build 1.8.0_162-b12)
Java HotSpot(TM) 64-Bit Server VM (build 25.162-b12, mixed mode)
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Run the following:
git clone https://github.com/prestodb/presto
./mvnw clean install -DskipTests -Dair.check.skip-all -P ci -pl presto-hive-hadoop2 -am
Explanation: Javadoc fails for the "presto-hive-hadoop2" module of the Presto project. You can reproduce by cloning the project and building that module and dependencies. The "ci" profile is needed to run Javadoc. Disabling tests and checkers make the build faster (not required).
ERROR MESSAGES/STACK TRACES THAT OCCUR :
Exit code: 1 - javadoc: error - An internal exception has occurred.
(com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: /Users/dphillips/src/presto/presto-hive/target/presto-hive-0.195-SNAPSHOT.jar(/com/facebook/presto/hive/HiveSplitManager$1.class)
undeclared type variable: T
Please remove or make sure it appears in the correct subdirectory of the classpath.)
Please file a bug against the javadoc tool via the Java bug reporting page
(http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com)
for duplicates. Include error messages and the following diagnostic in your report. Thank you.
com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: /Users/dphillips/src/presto/presto-hive/target/presto-hive-0.195-SNAPSHOT.jar(/com/facebook/presto/hive/HiveSplitManager$1.class)
undeclared type variable: T
Please remove or make sure it appears in the correct subdirectory of the classpath.
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.badClassFile(ClassReader.java:278)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.findTypeVar(ClassReader.java:963)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readEnclosingMethodAttr(ClassReader.java:1451)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader$10.read(ClassReader.java:1170)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readAttrs(ClassReader.java:1537)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassAttrs(ClassReader.java:1551)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2612)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassBuffer(ClassReader.java:2706)
at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:2719)
at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:348)
at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:285)
at jdk.compiler/com.sun.tools.javac.code.Symbol.complete(Symbol.java:633)
at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.complete(Symbol.java:1314)
at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:1248)
at jdk.compiler/com.sun.tools.javac.code.Symbol$TypeSymbol.getEnclosedElements(Symbol.java:800)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getItems0(Utils.java:2468)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getItems0(Utils.java:2463)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.recursiveGetItems(Utils.java:2451)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils$16.visitPackage(Utils.java:2436)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils$16.visitPackage(Utils.java:2432)
at jdk.compiler/com.sun.tools.javac.code.Symbol$PackageSymbol.accept(Symbol.java:1166)
at java.compiler@9.0.4/javax.lang.model.util.AbstractElementVisitor6.visit(AbstractElementVisitor6.java:106)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getItems(Utils.java:2445)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getClasses(Utils.java:2182)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getAllClasses(Utils.java:2355)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateClassFiles(AbstractDoclet.java:273)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:207)
at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.run(AbstractDoclet.java:117)
at jdk.javadoc/jdk.javadoc.doclet.StandardDoclet.run(StandardDoclet.java:72)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.parseAndExecute(Start.java:574)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:423)
at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:340)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63)
at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52)
Command line was: /Library/Java/JavaVirtualMachines/jdk-9.0.4.jdk/Contents/Home/bin/javadoc -J-Xmx1024m @options @packages
Refer to the generated Javadoc files in '/Users/dphillips/src/presto/presto-hive-hadoop2/target/apidocs' dir.
REPRODUCIBILITY :
This bug can be reproduced always.