|
1 | 1 | /* |
2 | | - * Copyright (c) 2021, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2021, 2026, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * This code is free software; you can redistribute it and/or modify it |
|
21 | 21 | * questions. |
22 | 22 | */ |
23 | 23 |
|
24 | | -/* @test |
25 | | - @bug 8262731 |
26 | | - @key headful printer |
27 | | - @summary Verify that "PrinterJob.print" throws the expected exception, |
28 | | - if "Printable.print" throws an exception. |
29 | | - @run main ExceptionFromPrintableIsIgnoredTest MAIN PE |
30 | | - @run main ExceptionFromPrintableIsIgnoredTest MAIN RE |
31 | | - @run main ExceptionFromPrintableIsIgnoredTest EDT PE |
32 | | - @run main ExceptionFromPrintableIsIgnoredTest EDT RE |
| 24 | +/* |
| 25 | + * @test |
| 26 | + * @bug 8262731 8268675 |
| 27 | + * @key printer |
| 28 | + * @summary Verify that "PrinterJob.print" throws the expected exception, |
| 29 | + * if "Printable.print" throws an exception. |
| 30 | + * @run main ExceptionFromPrintableIsIgnoredTest MAIN PE |
| 31 | + * @run main ExceptionFromPrintableIsIgnoredTest MAIN RE |
| 32 | + * @run main ExceptionFromPrintableIsIgnoredTest EDT PE |
| 33 | + * @run main ExceptionFromPrintableIsIgnoredTest EDT RE |
33 | 34 | */ |
34 | 35 |
|
35 | 36 | import java.awt.Graphics; |
@@ -64,14 +65,6 @@ public ExceptionFromPrintableIsIgnoredTest( |
64 | 65 | "Test started. threadType='%s', exceptionType='%s'", |
65 | 66 | threadType, exceptionType)); |
66 | 67 |
|
67 | | - String osName = System.getProperty("os.name"); |
68 | | - boolean isOSX = osName.toLowerCase().startsWith("mac"); |
69 | | - if ((exceptionType == TestExceptionType.RE) && !isOSX) { |
70 | | - System.out.println( |
71 | | - "Currently this test scenario can be verified only on macOS."); |
72 | | - return; |
73 | | - } |
74 | | - |
75 | 68 | printError = null; |
76 | 69 |
|
77 | 70 | if (threadType == TestThreadType.MAIN) { |
|
0 commit comments