--- a/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java Fri Apr 15 11:48:08 2016 +0530
+++ b/jdk/src/java.desktop/macosx/classes/sun/lwawt/LWToolkit.java Fri Apr 15 11:52:23 2016 +0530
@@ -404,6 +404,10 @@
public final PrintJob getPrintJob(Frame frame, String doctitle,
JobAttributes jobAttributes,
PageAttributes pageAttributes) {
+ if (frame == null) {
+ throw new NullPointerException("frame must not be null");
+ }
+
if (GraphicsEnvironment.isHeadless()) {
throw new IllegalArgumentException();
}