JDK-7129676 : test/tools/javac/diags/Example.java needs some cleanup
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_xp
  • CPU: generic
  • Submitted: 2012-01-13
  • Updated: 2017-10-20
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.
Other
tbd_minorUnresolved
Related Reports
Relates :  
Description
CR 7127924 was filed due to some failures during windows integrations.
The fix for that CR was to run the three @tests in 
   test/tools/javac/diags
in othervm mode to force a file that is intentionally left unclosed to be closed after the test has been run.

The Evaluation in that CR suggests a more sophisticated fix, which could be done for this CR.

Another possible problem with these fixes is that the file that is left open tends to get closed when a gc happens - I presume a finalizer closes it.  It seems like there might be a window between when this file is created by the ProcUnclosedTypeFiles example, and when it is accessed in that example, during which a gc could run and cause the file to be closed.  If this were to happen, it seems like it would cause the current @test to fail.  I tried to cause this this failure but was unable to do so.