On Fri, 25 Jun 2021 21:20:53 GMT, Kevin Rushforth <k...@openjdk.org> wrote:

>> 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.

we do remap null to the empty string .. the code in 
JobSettings.outputFileProperty() does it.
So this will never be null

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

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

Reply via email to