From: Philippe Proulx Date: Mon, 3 Aug 2015 20:40:03 +0000 (-0400) Subject: Fix: Java agent: update ref count in enabledLoggers X-Git-Tag: v2.7.0-rc2~13 X-Git-Url: https://git.lttng.org./?a=commitdiff_plain;h=c5e533a7343448a2c3342ca1f300f177124ce35d;p=lttng-ust.git Fix: Java agent: update ref count in enabledLoggers Integer objects are immutable in Java, so Integer refcount = enabledLoggers.get(name); refcount--; does not update the value in enabledLoggers. Signed-off-by: Philippe Proulx Signed-off-by: Mathieu Desnoyers --- diff --git a/liblttng-ust-java-agent/java/org/lttng/ust/agent/LogFrameworkSkeleton.java b/liblttng-ust-java-agent/java/org/lttng/ust/agent/LogFrameworkSkeleton.java index 6d1ea9f6..0fe7ad6b 100644 --- a/liblttng-ust-java-agent/java/org/lttng/ust/agent/LogFrameworkSkeleton.java +++ b/liblttng-ust-java-agent/java/org/lttng/ust/agent/LogFrameworkSkeleton.java @@ -67,6 +67,7 @@ public abstract class LogFrameworkSkeleton implements LogFramework { Integer refcount = enabledLoggers.get(name); refcount--; assert (refcount >= 0); + enabledLoggers.put(name, refcount); if (refcount == 0) { /* Event is not used anymore, remove it from the map */