Fix: Java agent: update ref count in enabledLoggers
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Mon, 3 Aug 2015 20:40:03 +0000 (16:40 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Tue, 4 Aug 2015 18:59:59 +0000 (14:59 -0400)
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 <eeppeliteloop@gmail.com>
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
liblttng-ust-java-agent/java/org/lttng/ust/agent/LogFrameworkSkeleton.java

index 6d1ea9f68c9e85889e19db7a185588c2bc52d0a7..0fe7ad6b06abb387978f01ec3283dd9275b57d6d 100644 (file)
@@ -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 */
This page took 0.024551 seconds and 4 git commands to generate.