JDK-7148622 : Some diagnostic methods do not go through Log.report
Type:Sub-task
Component:tools
Sub-Component:javac
Affected Version:8
Priority:P3
Status:Closed
Resolution:Fixed
OS:generic
CPU:unknown
Submitted:2012-02-24
Updated:2012-09-28
Resolved:2012-03-19
The Version table provides details related to the release that this issue/RFE will be addressed.
Unresolved : Release in which this issue/RFE will be addressed. Resolved: Release in which this issue/RFE has been resolved. Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.
One of the diagostic method (Log.strictMandatoryWarning) does not go through Log.report() - instead it calls Log.writeDiagnosic directly.
Comments
SUGGESTED FIX
A webrev of this fi is available at the following URL:
http://hg.openjdk.java.net/jdk8/tl/langtools/rev/dda6a5b15580
06-03-2012
EVALUATION
This is bad - as diagnostics reported this way will not be subject to the deferred diagnostic logic; since there's just one usage of this method, and it is used to report a warning, we can now use Log.mandatoryWarning method and preserve the same semantics as before, despite we now go through report().
The only difference will be that, in case maxWarnings have already been displayed (100 by default), the mandatory diagnostic will be suppressed. But that's probably ok.