You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "timtebeek (via GitHub)" <gi...@apache.org> on 2023/03/20 08:22:42 UTC

[GitHub] [maven-doxia] timtebeek commented on a diff in pull request #156: [MNG-6825] Replace Plexus IOUtil with IOUtils from commons-io

timtebeek commented on code in PR #156:
URL: https://github.com/apache/maven-doxia/pull/156#discussion_r1141764135


##########
doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/AbstractSinkTest.java:
##########
@@ -110,7 +110,7 @@ public final void testTestDocument() throws IOException {
             SinkTestDocument.generate(testSink);
         } finally {
             testSink.close();
-            IOUtil.close(writer);
+            IOUtils.close(writer);

Review Comment:
   Looked at this briefly, but `Sink` does not implement `AutoCloseable`, which makes it slightly awkward, especially as some of the multiple `Sink#close()` implementations call out to `init()` for instance, so leaving out `testSink.close()` is also not an option. You'd then have to declare `Sink` outside the try with resources, and close that through finally, which could change the order of the `close` calls if I'm not mistaken. Any other suggestions on how to handle this here?



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@maven.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org