Suppress static method warning
[lttng-ust.git] / liblttng-ust-java-agent / java / lttng-ust-agent-common / org / lttng / ust / agent / LTTngAgent.java
index 1a6b59a622cf2b6797fdb2e53bb714be6946961b..ebbe2357770b6c9b57e6f386fab1f89c22d0e140 100644 (file)
@@ -49,12 +49,16 @@ public class LTTngAgent {
 
        /**
         * Dispose the agent. Applications should call this once they are done
-        * logging.
+        * logging. This dispose function is non-static for backwards
+        * compatibility purposes.
         */
-       public static synchronized void dispose() {
-               if (instance != null) {
-                       instance.disposeInstance();
-                       instance = null;
+       @SuppressWarnings("static-method")
+       public void dispose() {
+               synchronized (LTTngAgent.class) {
+                       if (instance != null) {
+                               instance.disposeInstance();
+                               instance = null;
+                       }
                }
                return;
        }
This page took 0.023351 seconds and 4 git commands to generate.