-
Bug
-
Resolution: Not an Issue
-
P4
-
None
-
12
-
x86_64
-
windows_10
ADDITIONAL SYSTEM INFORMATION :
Windows 10 , Java 12-ea19
A DESCRIPTION OF THE PROBLEM :
This is a similar issue asJDK-8193355 : Getting NullPointerException in RasterPrinterJob class while accessing the print () of Printable interface
The exception occurs now on line 1280
Caused by: java.lang.NullPointerException: null
at java.desktop/sun.print.RasterPrinterJob.setAttributes(RasterPrinterJob.java:1280)
at java.desktop/sun.awt.windows.WPrinterJob.setAttributes(WPrinterJob.java:696)
at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1550)
at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1483)
REGRESSION : Last worked in version 12
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public void actionPerformed(ActionEvent e) {
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintable(this);
boolean ok = job.printDialog();
if (ok) {
try {
job.print();
} catch (PrinterException ex) {
/* The job did not successfully complete */
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The page should print correctly
ACTUAL -
A nullpointer exception is thrown
---------- BEGIN SOURCE ----------
public void actionPerformed(ActionEvent e) {
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintable(this);
boolean ok = job.printDialog();
if (ok) {
try {
job.print();
} catch (PrinterException ex) {
/* The job did not successfully complete */
}
}
}
---------- END SOURCE ----------
FREQUENCY : always
Windows 10 , Java 12-ea19
A DESCRIPTION OF THE PROBLEM :
This is a similar issue as
The exception occurs now on line 1280
Caused by: java.lang.NullPointerException: null
at java.desktop/sun.print.RasterPrinterJob.setAttributes(RasterPrinterJob.java:1280)
at java.desktop/sun.awt.windows.WPrinterJob.setAttributes(WPrinterJob.java:696)
at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1550)
at java.desktop/sun.print.RasterPrinterJob.print(RasterPrinterJob.java:1483)
REGRESSION : Last worked in version 12
STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
public void actionPerformed(ActionEvent e) {
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintable(this);
boolean ok = job.printDialog();
if (ok) {
try {
job.print();
} catch (PrinterException ex) {
/* The job did not successfully complete */
}
}
}
EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
The page should print correctly
ACTUAL -
A nullpointer exception is thrown
---------- BEGIN SOURCE ----------
public void actionPerformed(ActionEvent e) {
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintable(this);
boolean ok = job.printDialog();
if (ok) {
try {
job.print();
} catch (PrinterException ex) {
/* The job did not successfully complete */
}
}
}
---------- END SOURCE ----------
FREQUENCY : always