RFR: 8223717: javafx printing: Support Specifying Print to File in the API [v3]

Kevin Rushforth kcr at openjdk.java.net
Fri Jun 25 21:28:04 UTC 2021


On Fri, 25 Jun 2021 03:44:56 GMT, Prasanta Sadhukhan <psadhukhan at openjdk.org> wrote:

>> Phil Race has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   8223717: javafx printing: Support Specifying Print to File in the API
>
> modules/javafx.graphics/src/main/java/com/sun/prism/j2d/print/J2DPrinterJob.java line 839:
> 
>> 837:             security.checkPrintJobAccess();
>> 838:             String file = settings.getOutputFile();
>> 839:             if (!file.isEmpty()) {
> 
> Don't we need to check for file!= null?

The default value for the property is the empty string. But it does bring up a good point that we should either check and throw NPE if `setOutputFile` is called with `null` or we should map null to the empty string.

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

PR: https://git.openjdk.java.net/jfx/pull/543


More information about the openjfx-dev mailing list