Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
please sonar and override finalize methods
authorFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 13 Mar 2017 08:45:32 +0000 (09:45 +0100)
committerFrederic Suter <frederic.suter@cc.in2p3.fr>
Mon, 13 Mar 2017 08:45:32 +0000 (09:45 +0100)
src/bindings/java/org/simgrid/msg/Comm.java
src/bindings/java/org/simgrid/msg/Mutex.java
src/bindings/java/org/simgrid/msg/RngStream.java
src/bindings/java/org/simgrid/msg/Semaphore.java
src/bindings/java/org/simgrid/msg/Task.java

index c48a820..99b889d 100644 (file)
@@ -30,6 +30,7 @@ public class Comm {
 
        }
        /** Destroy the C communication object, when the GC reclaims the java part. */
+       @Override
        protected void finalize() throws Throwable{
                nativeFinalize();
        }
index 5812dfa..77a72ca 100644 (file)
@@ -18,6 +18,7 @@ public class Mutex {
                init();
        }
 
+       @Override
        protected void finalize() throws Throwable {
                nativeFinalize();
        }
index e286c4a..0ad8dfe 100644 (file)
@@ -42,6 +42,7 @@ public class RngStream {
         */
        private native void create(String name);
 
+       @Override
        protected void finalize() throws Throwable{
                nativeFinalize();
        }
index 4f23563..45ffb69 100644 (file)
@@ -67,6 +67,7 @@ public class Semaphore {
 
 
        /** Deletes this semaphore when the GC reclaims it */
+       @Override
        protected void finalize() throws Throwable {
                nativeFinalize();
        }
index 47f87fa..708978c 100644 (file)
@@ -164,6 +164,7 @@ public class Task {
        public native void cancel();
 
        /** Deletes a task once the garbage collector reclaims it */
+       @Override
        protected void finalize() throws Throwable{
                nativeFinalize();
                bind=0; // to avoid segfaults if the impossible happens yet again making this task surviving its finalize()