JDK-6794959 : add new switch -XDexpectKeys=key,key....
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 6,7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2009-01-16
  • Updated: 2012-01-13
  • Resolved: 2012-01-13
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.

To download the current JDK release, click here.
JDK 7
7 b46Fixed
Related Reports
Relates :  
Description
We should add a new hidden switch -XDexpectKeys=key1,key2,... to assist in writing better regression tests that check for the presence of specific diagnostics in the output.

If such an option is given on the command line, the exit code from javac will be changed such the exit code is 0 if and only if all the keys are found in the diagnostics that were generated.

Comments
EVALUATION Yes. handle the option in Log; check keys at Log.report. Fix exit code in Main
16-01-2009