On Wed, 24 Sep 2025 20:45:47 GMT, Sergey Bylokhov <[email protected]> wrote:
> Does this new statement in the spec covered by any tests?
The test pushed in the previous PR covers it.
> How will it behave if getGraphics is called before end, but the Graphics
> object is used after end has been called?
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();
-------------
PR Comment: https://git.openjdk.org/jdk/pull/27474#issuecomment-3330880622