On Fri, 16 Jul 2021 21:09:45 GMT, Phil Race <p...@openjdk.org> wrote:
> Printer can never be null. Its instaniated by the private PrinterJob > constructor. If `Printer.getDefaultPrinter()` can never return null, then you are right that there is no bug here. > So perhaps more to the point is are the lines right before that necessary ? > > if (value == null) { > value = Printer.getDefaultPrinter(); > } Yes, this null check is needed, since we specify that setting the `printer` property to `null` will use the default printer. ------------- PR: https://git.openjdk.java.net/jfx/pull/574