Fix a sonar-reported bug 88/88888/2
authorRobert Varga <robert.varga@pantheon.tech>
Sat, 4 Apr 2020 08:10:05 +0000 (10:10 +0200)
committerRobert Varga <nite@hq.sk>
Mon, 20 Jul 2020 09:04:57 +0000 (09:04 +0000)
Calling finalize first and then calling shutdownNow() does not
really make sense. Invert the calls.

Change-Id: I1d8164d4c433805cf4cda779e190c7ae32829099
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/samples/clustering-test-app/provider/src/main/java/org/opendaylight/controller/clustering/it/provider/impl/FinalizableScheduledExecutorService.java

index f0873034b4e44be30398a490021607fbf1385fdf..ac82d4e123e5999bf4833fa74a8f384788461f55 100644 (file)
@@ -32,7 +32,7 @@ final class FinalizableScheduledExecutorService extends ScheduledThreadPoolExecu
     @Override
     @SuppressWarnings("checkstyle:NoFinalizer")
     protected void finalize() {
-        super.finalize();
         super.shutdownNow();
+        super.finalize();
     }
 }