From c5e533a7343448a2c3342ca1f300f177124ce35d Mon Sep 17 00:00:00 2001 From: Philippe Proulx Date: Mon, 3 Aug 2015 16:40:03 -0400 Subject: [PATCH] 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 --- .../java/org/lttng/ust/agent/LogFrameworkSkeleton.java | 1 + 1 file changed, 1 insertion(+) 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 */ -- 2.34.1