On Fri, 25 Sep 2020 04:57:48 GMT, Prasanta Sadhukhan <psadhuk...@openjdk.org> 
wrote:

>> A long-standing bug on macOS: 
>> https://bugs.openjdk.java.net/browse/JDK-7179006
>> 
>> The fix is to propagate whatever is set as the Destination down to native 
>> and set it on the native printing object.
>> 
>> Also if using the native dialog, but with attributes, copy back the 
>> destination from native to the Java attribute set.
>> 
>> The new test can directly test printing to file in an automated way - so 
>> long as there is a printer.
>> 
>> The updated manual test can be used to verify the  cross-platform dialog 
>> case.
>
> src/java.desktop/macosx/classes/sun/lwawt/macosx/CPrinterJob.java line 257:
> 
>> 255:
>> 256:     private void setDestinationFile(String dest) {
>> 257:         System.out.println("dest="+dest+" attrs="+attributes);
> 
> Probably this println should be removed.

oops

> test/jdk/java/awt/print/PrinterJob/PrintToFileTest.java line 60:
> 
>> 58:         if (!file.exists()) {
>> 59:              throw new RuntimeException("No file created");
>> 60:         }
> 
> I guess we need to delete the file in finally block, if created.

I meant to leave it. So we can look at it if we need to.

-------------

PR: https://git.openjdk.java.net/jdk/pull/339

Reply via email to