ADDITIONAL SYSTEM INFORMATION :
Linux back 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux
java version "1.8.0_171"
Java(TM) SE Runtime Environment (build 1.8.0_171-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.171-b11, mixed mode)
A DESCRIPTION OF THE PROBLEM :
javac fails at simple class file
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
checkout https://github.com/flapdoodle-oss/javacbug
mvn clean install
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
compiled class files
ACTUAL -
Compiling 2 source files to /home/mosmann/develop/git/public/javacbug/target/classes
An exception has occurred in the compiler (1.8.0_171). Please file a bug against the Java compiler via the Java bug reporting page (http://bugreport.java.com) after checking the Bug Database (http://bugs.java.com) for duplicates. Include your program and the following diagnostic in your report. Thank you.
java.lang.AssertionError: isSubClass T
at com.sun.tools.javac.code.Symbol.isSubClass(Symbol.java:447)
at com.sun.tools.javac.code.Symbol.isMemberOf(Symbol.java:456)
at com.sun.tools.javac.code.Symbol$MethodSymbol.overrides(Symbol.java:1479)
at com.sun.tools.javac.code.Types$ImplementationCache.implementationInternal(Types.java:2693)
at com.sun.tools.javac.code.Types$ImplementationCache.get(Types.java:2675)
at com.sun.tools.javac.code.Types.implementation(Types.java:2704)
at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1539)
at com.sun.tools.javac.code.Symbol$MethodSymbol.implementation(Symbol.java:1528)
at com.sun.tools.javac.comp.Resolve.notOverriddenIn(Resolve.java:419)
at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:405)
at com.sun.tools.javac.comp.Resolve.isAccessible(Resolve.java:365)
at com.sun.tools.javac.comp.Resolve.selectBest(Resolve.java:1463)
at com.sun.tools.javac.comp.Resolve.findMethodInScope(Resolve.java:1633)
at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1725)
at com.sun.tools.javac.comp.Resolve.findMethod(Resolve.java:1677)
at com.sun.tools.javac.comp.Resolve$MethodReferenceLookupHelper.lookup(Resolve.java:3192)
at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3348)
at com.sun.tools.javac.comp.Resolve.lookupMethod(Resolve.java:3333)
at com.sun.tools.javac.comp.Resolve.getMemberReference(Resolve.java:2741)
at com.sun.tools.javac.comp.DeferredAttr$DeferredChecker.visitReference(DeferredAttr.java:1183)
at com.sun.tools.javac.tree.JCTree$JCMemberReference.accept(JCTree.java:1973)
at com.sun.tools.javac.tree.TreeScanner.scan(TreeScanner.java:49)
at com.sun.tools.javac.comp.DeferredAttr$FilterScanner.scan(DeferredAttr.java:913)
at com.sun.tools.javac.comp.DeferredAttr.isDeferred(DeferredAttr.java:1100)
at com.sun.tools.javac.comp.Attr.attribArgs(Attr.java:670)
at com.sun.tools.javac.comp.Attr.visitApply(Attr.java:1816)
at com.sun.tools.javac.tree.JCTree$JCMethodInvocation.accept(JCTree.java:1465)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.attribExpr(Attr.java:625)
at com.sun.tools.javac.comp.Attr.visitExec(Attr.java:1593)
at com.sun.tools.javac.tree.JCTree$JCExpressionStatement.accept(JCTree.java:1296)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:645)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:661)
at com.sun.tools.javac.comp.Attr.visitLambda(Attr.java:2401)
at com.sun.tools.javac.tree.JCTree$JCLambda.accept(JCTree.java:1624)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.visitReturn(Attr.java:1686)
at com.sun.tools.javac.tree.JCTree$JCReturn.accept(JCTree.java:1384)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:645)
at com.sun.tools.javac.comp.Attr.attribStats(Attr.java:661)
at com.sun.tools.javac.comp.Attr.visitBlock(Attr.java:1124)
at com.sun.tools.javac.tree.JCTree$JCBlock.accept(JCTree.java:909)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:645)
at com.sun.tools.javac.comp.Attr.visitMethodDef(Attr.java:1013)
at com.sun.tools.javac.tree.JCTree$JCMethodDecl.accept(JCTree.java:778)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:645)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4364)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4272)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4201)
at com.sun.tools.javac.comp.Attr.visitClassDef(Attr.java:870)
at com.sun.tools.javac.tree.JCTree$JCClassDecl.accept(JCTree.java:693)
at com.sun.tools.javac.comp.Attr.attribTree(Attr.java:576)
at com.sun.tools.javac.comp.Attr.attribStat(Attr.java:645)
at com.sun.tools.javac.comp.Attr.attribClassBody(Attr.java:4364)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4272)
at com.sun.tools.javac.comp.Attr.attribClass(Attr.java:4201)
at com.sun.tools.javac.comp.Attr.attrib(Attr.java:4176)
at com.sun.tools.javac.main.JavaCompiler.attribute(JavaCompiler.java:1248)
at com.sun.tools.javac.main.JavaCompiler.compile2(JavaCompiler.java:901)
at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:860)
at com.sun.tools.javac.main.Main.compile(Main.java:523)
at com.sun.tools.javac.api.JavacTaskImpl.doCall(JavacTaskImpl.java:129)
at com.sun.tools.javac.api.JavacTaskImpl.call(JavacTaskImpl.java:138)
at org.codehaus.plexus.compiler.javac.JavaxToolsCompiler.compileInProcess(JavaxToolsCompiler.java:126)
at org.codehaus.plexus.compiler.javac.JavacCompiler.performCompile(JavacCompiler.java:169)
at org.apache.maven.plugin.compiler.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:785)
at org.apache.maven.plugin.compiler.CompilerMojo.execute(CompilerMojo.java:129)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:137)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:154)
at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:146)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:117)
at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:81)
at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:56)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:305)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:192)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:105)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:956)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:290)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:194)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
---------- BEGIN SOURCE ----------
https://github.com/flapdoodle-oss/javacbug
---------- END SOURCE ----------
CUSTOMER SUBMITTED WORKAROUND :
change from
spacing().ifPresent(instance::setSpacing);
margin().ifPresent(instance::setMargin);
to
spacing().ifPresent((Boolean t) -> instance.setSpacing(t));
margin().ifPresent((Boolean t) -> instance.setMargin(t));
FREQUENCY : always