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

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 9
    • Affects Version/s: 9
    • Component/s: client-libs
    • Environment:

      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.

            Assignee:
            Prasanta Sadhukhan
            Reporter:
            Yuri Nesterenko (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: