JDK-6195923 : REG:Cancelling the file dlg does not cancel the print operation when sec manager is installed, win32
  • Type: Bug
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 5.0
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2004-11-16
  • Updated: 2010-04-02
  • Resolved: 2005-05-25
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 6
6 b15Fixed
Related Reports
Relates :  
Description
I have set the dialog type in Job Attributes to Native Dialog and calling Toolkit.getPrintJob() when security manager is installed. I have the following permissions:

RuntimePermission - QueuePrintJob
FilePermission - ALL FILES - read,write, execute, delete
RuntimePermission - SetSecurityManager

I am running the attached app which would print the frame shown through a native dialog. When the native dialog comes up, I am selecting PrintToFile option and clicking OK. A file dialog appears. I am cancelling the file dialog. But I am surprised to see a valid PrintJob being returned and in fact, the printing operation is carried out successfully. This is incorrect. Cancelling the file dialog must cancel the print operation and a Null PrintJob must be returned.

This is reproducible only since Tiger and not reproducible on 1.4.2. This is reproducible only on Win32. Reproducible on the current Mustang PIT build (2004-11-15).

I have attached a sample test. Execute the sample test on WinXP. A Frame would appear. Click on 'Toggle Sec Manager' to install a sec manager. Click on 'Native Dlg' button. A native dialog will appear. Choose PrintToFile option and click OK. When FileDialog appears, cancel the dialog. If you see a Valid PJOB and PrinterGraphics object being printed on the console and if you see a 'DONE' message, the bug is reproduced.
###@###.### 2004-11-16 15:09:06 GMT

Comments
EVALUATION This bug no longer occurs since mustang b15 (fix for 5065001) but will leave this bug open until 6275359 is resolved - a bug introduced by the fix. ###@###.### 2005-05-24 18:19:06 GMT I will just mark this as integrated and add reference to this in 6275359 and 5065001. ###@###.### 2005-05-25 19:22:49 GMT
24-05-2005