Affects Version/s: 2.7, 2.8.2
Fix Version/s: None
Oracle JDK 8
Background: Almost a week ago, our build started breaking with weird errors on Javadoc. Initially only one user and the build machine were seeing it, but it gradually spread and now happens for everyone on the team.
Yesterday I spent most of the day investigating it and have cut it down to a fairly minimal project, which I uploaded here: https://github.com/trejkaz/gradle_wtf_compile
The project name does contain "gradle" because at the time we had assumed Gradle was to blame. However, this has since been removed from the list of potential culprits, and all that's left now is log4j and javac itself. Given that Oracle are near to useless at fixing even critical bugs, I figured reporting it here would be a good next step in case it turns out to be log4j's fault.
Basically, if I have code like this:
And I try to build the code:
I get an error:
The error message supposedly occurs when the thing you provided is not an exception, but that is not the case at all.
If I remove log4j-core from the classpath, compilation succeeds. If I remove -Xdoclint from the command-line, that dodges the problem during javac, but then javadoc fails later in the build, so it isn't a solution.
I have many questions...
1. How does just having this one jar on the classpath somehow break compilation when I'm not even calling it?
2. How is it that we are the first ones to encounter this? I'm seeing it on literally every platform, and have tested multiple versions of Java 8 that I had on hand, and all of them behaved the same way. Maybe nobody is using Java 8 and log4j in the same project yet, but it seems a bit unlikely.