JDK-8194281 : Javadoc complains about bad class file, while compile and execution work fine
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 9,9.0.1,10
  • Priority: P3
  • Status: Resolved
  • Resolution: Duplicate
  • OS: generic
  • CPU: generic
  • Submitted: 2018-01-01
  • Updated: 2018-01-02
  • Resolved: 2018-01-02
Related Reports
Duplicate :  
Description
FULL PRODUCT VERSION :
java version "9.0.1"
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)

ADDITIONAL OS VERSION INFORMATION :
Linux 4.10.0-42-generic #46-Ubuntu SMP Mon Dec 4 14:38:01 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

A DESCRIPTION OF THE PROBLEM :
Compiling the example, then running javadoc throws an error:

Loading source file example/Foo.java...
Constructing Javadoc information...
Standard Doclet version 9.0.1
Building tree for all the packages and classes...
Generating ./example/Foo.html...
Generating ./example/package-frame.html...
Generating ./example/package-summary.html...
Generating ./example/package-tree.html...
Generating ./constant-values.html...
javadoc: error - An exception occurred while building a component: Contents
	(com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: ./example/Foo$1.class
  class file contains malformed variable arity method: (java.lang.Object[],example.Foo)
  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: ./example/Foo$1.class
  class file contains malformed variable arity method: (java.lang.Object[],example.Foo)
  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.readMethod(ClassReader.java:2402)
	at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2641)
	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.1/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.builders.ConstantsSummaryBuilder.hasConstantField(ConstantsSummaryBuilder.java:258)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.buildContents(ConstantsSummaryBuilder.java:171)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:200)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.buildConstantSummary(ConstantsSummaryBuilder.java:156)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.build(ConstantsSummaryBuilder.java:136)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateOtherFiles(AbstractDoclet.java:228)
	at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:116)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:213)
	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)
1 error


REGRESSION.  Last worked in version 8u152

ADDITIONAL REGRESSION INFORMATION: 
java version "1.8.0_152"
Java(TM) SE Runtime Environment (build 1.8.0_152-b16)
Java HotSpot(TM) 64-Bit Server VM (build 25.152-b16, mixed mode)

STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
Create example/Foo.java:

--------
package example;

public abstract class Foo {
    abstract boolean apply(Object input);

    Foo(Object... params) {
    }

    static Foo from(final Foo other) {
        return new Foo() {
            @Override
            public boolean apply(Object input) {
                return other.apply(input);
            }
        };
    }
}
--------

Compile: 
> javac example/Foo.java
Javadoc:
> javadoc example/Foo.java

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
Successful creation of the Javadoc
ACTUAL -
Error:

Loading source file example/Foo.java...
Constructing Javadoc information...
Standard Doclet version 9.0.1
Building tree for all the packages and classes...
Generating ./example/Foo.html...
Generating ./example/package-frame.html...
Generating ./example/package-summary.html...
Generating ./example/package-tree.html...
Generating ./constant-values.html...
javadoc: error - An exception occurred while building a component: Contents
	(com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: ./example/Foo$1.class
  class file contains malformed variable arity method: (java.lang.Object[],example.Foo)
  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: ./example/Foo$1.class
  class file contains malformed variable arity method: (java.lang.Object[],example.Foo)
  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.readMethod(ClassReader.java:2402)
	at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2641)
	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.1/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.builders.ConstantsSummaryBuilder.hasConstantField(ConstantsSummaryBuilder.java:258)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.buildContents(ConstantsSummaryBuilder.java:171)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:200)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.buildConstantSummary(ConstantsSummaryBuilder.java:156)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.build(ConstantsSummaryBuilder.java:136)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateOtherFiles(AbstractDoclet.java:228)
	at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:116)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:213)
	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)
1 error


ERROR MESSAGES/STACK TRACES THAT OCCUR :
Loading source file example/Foo.java...
Constructing Javadoc information...
Standard Doclet version 9.0.1
Building tree for all the packages and classes...
Generating ./example/Foo.html...
Generating ./example/package-frame.html...
Generating ./example/package-summary.html...
Generating ./example/package-tree.html...
Generating ./constant-values.html...
javadoc: error - An exception occurred while building a component: Contents
	(com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: ./example/Foo$1.class
  class file contains malformed variable arity method: (java.lang.Object[],example.Foo)
  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: ./example/Foo$1.class
  class file contains malformed variable arity method: (java.lang.Object[],example.Foo)
  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.readMethod(ClassReader.java:2402)
	at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2641)
	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.1/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.builders.ConstantsSummaryBuilder.hasConstantField(ConstantsSummaryBuilder.java:258)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.buildContents(ConstantsSummaryBuilder.java:171)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.buildChildren(AbstractBuilder.java:200)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.buildConstantSummary(ConstantsSummaryBuilder.java:156)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.AbstractBuilder.build(AbstractBuilder.java:157)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.build(ConstantsSummaryBuilder.java:136)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateOtherFiles(AbstractDoclet.java:228)
	at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:116)
	at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:213)
	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)
1 error


REPRODUCIBILITY :
This bug can be reproduced always.

---------- BEGIN SOURCE ----------
example/Foo.java
--------
package example;

public abstract class Foo {
    abstract boolean apply(Object input);

    Foo(Object... params) {
    }

    static Foo from(final Foo other) {
        return new Foo() {
            @Override
            public boolean apply(Object input) {
                return other.apply(input);
            }
        };
    }
}
--------
---------- END SOURCE ----------

CUSTOMER SUBMITTED WORKAROUND :
Create an inner class

--------
package example;

public abstract class Foo {
    abstract boolean apply(Object input);

    Foo(Object... params) {
    }

    static Foo from(final Foo other) {
        return new MyFoo(other);
    }

    private static class MyFoo extends Foo {
        private final Foo other;

        public MyFoo(Foo other) {
            this.other = other;
        }

        @Override
        public boolean apply(Object input) {
            return other.apply(input);
        }
    }
}
--------


Comments
The fundamental issue here is CompletionError thrown by javac see: JDK-8187950
02-01-2018

This is a regression. Couple of things to note here. Regression started from 9 ea b104 onwards but actual javadoc crash started from 9 ea b134 onwards. 8u162 - Pass 9 ea b103 - Pass 9 ea b104 - Fail (Javadoc Fails with error) 9 ea b134 - Fail (Javadoc Crashes) 9 GA (b181) - Fail (Javadoc Crashes) 10 ea b37 - Fail (Javadoc Crashes) From my analysis if we compile Foo.java without package header there is no issue. Crash occurs only with Foo.java containing pakage information (package example)
02-01-2018

This is an issue reproducible on 10 ea b37 == -sh-4.2$ /scratch/fairoz/JAVA/jdk10/jdk-10-ea+37/bin/javac example/Foo.java -sh-4.2$ /scratch/fairoz/JAVA/jdk10/jdk-10-ea+37/bin/javadoc example/Foo.java Loading source file example/Foo.java... Constructing Javadoc information... Standard Doclet version 10-ea Building tree for all the packages and classes... Generating ./example/Foo.html... Generating ./example/package-frame.html... Generating ./example/package-summary.html... Generating ./example/package-tree.html... Generating ./constant-values.html... javadoc: error - An internal exception has occurred. (com.sun.tools.javac.code.ClassFinder$BadClassFile: bad class file: ./example/Foo$1.class class file contains malformed variable arity method: Foo$1(java.lang.Object[],example.Foo) 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: ./example/Foo$1.class class file contains malformed variable arity method: Foo$1(java.lang.Object[],example.Foo) 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:281) at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readMethod(ClassReader.java:2404) at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClass(ClassReader.java:2645) at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassBuffer(ClassReader.java:2709) at jdk.compiler/com.sun.tools.javac.jvm.ClassReader.readClassFile(ClassReader.java:2722) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.fillIn(ClassFinder.java:352) at jdk.compiler/com.sun.tools.javac.code.ClassFinder.complete(ClassFinder.java:284) 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:1308) at jdk.compiler/com.sun.tools.javac.code.Symbol$ClassSymbol.flags(Symbol.java:1242) 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:2404) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getItems0(Utils.java:2399) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.recursiveGetItems(Utils.java:2387) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils$17.visitPackage(Utils.java:2372) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils$17.visitPackage(Utils.java:2368) at jdk.compiler/com.sun.tools.javac.code.Symbol$PackageSymbol.accept(Symbol.java:1160) at java.compiler@10-ea/javax.lang.model.util.AbstractElementVisitor6.visit(AbstractElementVisitor6.java:106) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getItems(Utils.java:2381) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getClasses(Utils.java:2121) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.util.Utils.getAllClasses(Utils.java:2294) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.hasConstantField(ConstantsSummaryBuilder.java:247) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.buildContents(ConstantsSummaryBuilder.java:159) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.buildConstantSummary(ConstantsSummaryBuilder.java:143) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.builders.ConstantsSummaryBuilder.build(ConstantsSummaryBuilder.java:131) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.generateOtherFiles(AbstractDoclet.java:232) at jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.HtmlDoclet.generateOtherFiles(HtmlDoclet.java:115) at jdk.javadoc/jdk.javadoc.internal.doclets.toolkit.AbstractDoclet.startGeneration(AbstractDoclet.java:217) 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:581) at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:430) at jdk.javadoc/jdk.javadoc.internal.tool.Start.begin(Start.java:343) at jdk.javadoc/jdk.javadoc.internal.tool.Main.execute(Main.java:63) at jdk.javadoc/jdk.javadoc.internal.tool.Main.main(Main.java:52) 1 error
02-01-2018