Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8154057

[macosx] getPrintJob doesn't throw NPE if Frame is null AND type is COMMON.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 9
    • 9
    • client-libs
    • OS X 10.11 (and perhaps any earlier).

    • b117

      Run the following test on OS X:

      import java.awt.*;

      public class TT {
          public static void main(String args[]) {
              JobAttributes ja = new JobAttributes();
              ja.setDialog(JobAttributes.DialogType.COMMON);
              Toolkit.getDefaultToolkit().getPrintJob(null, "Test Printing", ja, null);
          }
      }

      It should throw NPE but it doesn't. On a machine with a printer configured it just does show a print dialog.

      I tried OS X 10.11 and jdk9 b113 but I guess any Oracle JDK would behave like this on any supported OS X version.

            psadhukhan Prasanta Sadhukhan
            yan Yuri Nesterenko
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: