You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by "Gary Gregory (JIRA)" <ji...@apache.org> on 2016/08/29 18:26:20 UTC

[jira] [Updated] (LOG4J2-1553) AbstractManager should implement AutoCloseable

     [ https://issues.apache.org/jira/browse/LOG4J2-1553?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Gregory updated LOG4J2-1553:
---------------------------------
    Description: 
The class {{AbstractManager}} should implement {{java.lang.AutoCloseable}}.

A manager holds on to resources that must be cleaned up. Typically these resources are allocated on instance creation and freed by calling the manager's {{release()}} method.

There are several benefits to this change:
- Make it obvious and formal that this kind of object must be properly managed.
- A reader or cloner of the code will know that there is a pattern here.
- Cleans up our unit tests which handle managers explicitly.

This pattern is used in many of our unit tests.

  was:AbstractManager should implement AutoCloseable.


> AbstractManager should implement AutoCloseable
> ----------------------------------------------
>
>                 Key: LOG4J2-1553
>                 URL: https://issues.apache.org/jira/browse/LOG4J2-1553
>             Project: Log4j 2
>          Issue Type: Improvement
>          Components: Appenders
>            Reporter: Gary Gregory
>            Assignee: Gary Gregory
>
> The class {{AbstractManager}} should implement {{java.lang.AutoCloseable}}.
> A manager holds on to resources that must be cleaned up. Typically these resources are allocated on instance creation and freed by calling the manager's {{release()}} method.
> There are several benefits to this change:
> - Make it obvious and formal that this kind of object must be properly managed.
> - A reader or cloner of the code will know that there is a pattern here.
> - Cleans up our unit tests which handle managers explicitly.
> This pattern is used in many of our unit tests.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-dev-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-dev-help@logging.apache.org