@SuppressWarnings("resource"): this is a factory method, the resource is
allocated and released elsewhere.Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/b5a35a70 Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/b5a35a70 Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/b5a35a70 Branch: refs/heads/master Commit: b5a35a70e8afffdfab44867b4282a83aaab48c9f Parents: 0540675 Author: Gary Gregory <[email protected]> Authored: Wed Sep 7 16:50:01 2016 -0700 Committer: Gary Gregory <[email protected]> Committed: Wed Sep 7 16:50:01 2016 -0700 ---------------------------------------------------------------------- .../org/apache/logging/log4j/core/appender/AbstractManager.java | 1 + 1 file changed, 1 insertion(+) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/b5a35a70/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java ---------------------------------------------------------------------- diff --git a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java index 137c898..3e90865 100644 --- a/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java +++ b/log4j-core/src/main/java/org/apache/logging/log4j/core/appender/AbstractManager.java @@ -100,6 +100,7 @@ public abstract class AbstractManager implements AutoCloseable { * @param <T> The type of the Factory data. * @return A Manager with the specified name and type. */ + // @SuppressWarnings("resource"): this is a factory method, the resource is allocated and released elsewhere. @SuppressWarnings("resource") public static <M extends AbstractManager, T> M getManager(final String name, final ManagerFactory<M, T> factory, final T data) {
