You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2023/03/28 14:38:00 UTC

[jira] [Commented] (DOXIA-698) org.apache.maven.doxia.sink.Sink should implement AutoCloseable

    [ https://issues.apache.org/jira/browse/DOXIA-698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17706034#comment-17706034 ] 

ASF GitHub Bot commented on DOXIA-698:
--------------------------------------

elharo commented on PR #160:
URL: https://github.com/apache/maven-doxia/pull/160#issuecomment-1487018107

   That behavior doesn't change. If a Sink implementation closes the stream/writer when the sink is closed, then it will still be closed when stream/writer is autoclosed. If the Sink implementation doesn't close the  stream/writer when the sink is closed, then it won't be closed now. Nothing in this PR changes what happens when a Sink's close method is invoked. It just enables try-with-resources to be used to implicitly invoke the close method instead of explicitly calling it. This makes for slightly simpler code and makes resource leaks where the sink isn't closed at all less likely. 
   




> org.apache.maven.doxia.sink.Sink should implement AutoCloseable
> ---------------------------------------------------------------
>
>                 Key: DOXIA-698
>                 URL: https://issues.apache.org/jira/browse/DOXIA-698
>             Project: Maven Doxia
>          Issue Type: New Feature
>            Reporter: Elliotte Rusty Harold
>            Assignee: Elliotte Rusty Harold
>            Priority: Minor
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)