RFR: 8368576: PrintJob.getGraphics() does not specify behavior after PrintJob.end()
Sergey Bylokhov
serb at openjdk.org
Wed Sep 24 22:50:39 UTC 2025
On Wed, 24 Sep 2025 22:14:33 GMT, Phil Race <prr at openjdk.org> wrote:
> Same as before - this is just a spec. change, no implementation. The implementation closes the graphics when end() is called so any rendering to it is a no-op. The spec for PrintJob.end() has the same text as shown below.
>
> ```
> /**
> * Ends the print job and does any necessary cleanup.
> */
> public synchronized void end() {
>
> /* Prevent the PrinterJob thread from appending any more
> * graphics to the to-be-drawn queue
> */
> graphicsToBeDrawn.close();
> ```
Does this mean that using the graphics object after calling .end is not specified as noop? The comments above is from the non public API.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27474#issuecomment-3330943289
More information about the client-libs-dev
mailing list