valerybokov edited a comment on pull request #107: URL: https://github.com/apache/pdfbox/pull/107#issuecomment-868306265
> RandomAccessInputStream and RandomAccessOutputStream are simple wrapper classes and close isn't needed at all. Maybe we should just add an empty implementation of close to document that. Right now try-with-resources avoids sonar warnings Yes, I've seen several cases where streams could not be closed. But why are you using the trick for COSOutputStream.close? You use fake try-with-resources statement to avoid sonar warnings, then you use swapping of streams to close right stream. Why not use try-with-resources with the correct stream and without RandomAccessOutputStream? I understand, maybe this code matches the documentation, but it is too confusing, IMO.  -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
