Run the attached test. You will get a frame with few buttons. Do the following -
- Click on 'Print Common'. A cross-platform print dialog would appear.
- Press 'ENTER'. Since 'PrintToFile' is selected, a file dialog will be opened.
- Either press 'OK' or Cancel the file dialog.
- Click on 'Print Native' button on the frame. A native print dialog will appear.
- Select 'PrintToFile' checkbox and click 'ok'.
You will get the NullPointerException which is shown below -
Exception in thread "Thread-3" java.lang.NullPointerException
at sun.awt.windows.WWindowPeer.getActiveWindowHandles(WWindowPeer.java:46)
at sun.awt.windows.WPrintDialogPeer._show(Native Method)
at sun.awt.windows.WPrintDialogPeer.access$000(WPrintDialogPeer.java:35
at sun.awt.windows.WPrintDialogPeer$1.run(WPrintDialogPeer.java:67)
at java.lang.Thread.run(Thread.java:637)
This is reproducible only on Win32. This is reproducible only on JDK7-b15 AWT PIT build and not reproducible on b13 promoted build. Hence it is a regression in b15 PIT.