mirror of
https://github.com/openjdk/jdk.git
synced 2026-04-09 06:28:49 +00:00
8021583: test/javax/print/autosense/PrintAutoSenseData.java throwing NPE
Reviewed-by: jchen, prr
This commit is contained in:
parent
2ce2cb1e0d
commit
d75477b147
@ -334,6 +334,10 @@ public class UnixPrintJob implements CancelablePrintJob {
|
||||
throw new PrintException("can't get print data: " + e.toString());
|
||||
}
|
||||
|
||||
if (data == null) {
|
||||
throw new PrintException("Null print data.");
|
||||
}
|
||||
|
||||
if (flavor == null || (!service.isDocFlavorSupported(flavor))) {
|
||||
notifyEvent(PrintJobEvent.JOB_FAILED);
|
||||
throw new PrintJobFlavorException("invalid flavor", flavor);
|
||||
|
||||
@ -340,6 +340,10 @@ public class Win32PrintJob implements CancelablePrintJob {
|
||||
throw new PrintException("can't get print data: " + e.toString());
|
||||
}
|
||||
|
||||
if (data == null) {
|
||||
throw new PrintException("Null print data.");
|
||||
}
|
||||
|
||||
if (flavor == null || (!service.isDocFlavorSupported(flavor))) {
|
||||
notifyEvent(PrintJobEvent.JOB_FAILED);
|
||||
throw new PrintJobFlavorException("invalid flavor", flavor);
|
||||
|
||||
@ -23,7 +23,7 @@
|
||||
|
||||
/*
|
||||
* @test
|
||||
* @bug 4468109
|
||||
* @bug 4468109 8021583
|
||||
* @summary Test for printing AUTOSENSE DocFlavor. No exception should be thrown.
|
||||
* @run main PrintAutoSenseData
|
||||
*/
|
||||
|
||||
1
jdk/test/javax/print/attribute/autosense/sample.txt
Normal file
1
jdk/test/javax/print/attribute/autosense/sample.txt
Normal file
@ -0,0 +1 @@
|
||||
This is a program for testing AutoSense data.
|
||||
Loading…
x
Reference in New Issue
Block a user