release resources in COSInputStream#463
Conversation
|
nit: the brace style of the new close() method uses same-line opening braces, while the rest of COSInputStream uses Allman style per PDFBox standard |
|
Copilot suggests this could be refactored so that it stores only the last element of decodeResults and that makes sense. And if we null that one, then we should mention in the javadoc that getDecodeResult() is not to be called after close(). |
This is bad idea to use the stream after its closing. Any method can throw IllegalOperationException (the stream is closed). IMHO, you shouldn't write something like "this method can/cannot be called when the stream is closed". Any method not recommended to call when the stream is closed. |
No description provided.