From 7234a00f0da2197958065d8da3a549d469078cd5 Mon Sep 17 00:00:00 2001 From: Trustin Lee Date: Mon, 10 Jun 2013 19:13:06 +0900 Subject: [PATCH] Add ResourceLeakDetector.ENABLED .. to provide a way to check if resource leak detection was enabled programmatically. --- common/src/main/java/io/netty/util/ResourceLeakDetector.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/common/src/main/java/io/netty/util/ResourceLeakDetector.java b/common/src/main/java/io/netty/util/ResourceLeakDetector.java index a6ea748718..6110b46715 100644 --- a/common/src/main/java/io/netty/util/ResourceLeakDetector.java +++ b/common/src/main/java/io/netty/util/ResourceLeakDetector.java @@ -30,6 +30,8 @@ public final class ResourceLeakDetector { private static final boolean DISABLED = SystemPropertyUtil.getBoolean("io.netty.noResourceLeakDetection", false); + public static final boolean ENABLED = !DISABLED; + private static final InternalLogger logger = InternalLoggerFactory.getInstance(ResourceLeakDetector.class); static {