Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[sonar] Mark deprecated method as "@Deprecated".
[simgrid.git] / src / bindings / java / org / simgrid / msg / Semaphore.java
index 45ffb69..7811aed 100644 (file)
@@ -1,25 +1,25 @@
-/* Copyright (c) 2012-2014. The SimGrid Team.
+/* Copyright (c) 2012-2019. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * under the terms of the license (GNU LGPL) which comes with this package. */
 
 package org.simgrid.msg;
-/** A semaphore implemented on top of SimGrid synchronization mechanisms. 
+/** A semaphore implemented on top of SimGrid synchronization mechanisms.
  * You can use it exactly the same way that you use classical semaphores
- * but to handle the interactions between the processes within the simulation.   
+ * but to handle the interactions between the processes within the simulation.
  *
  */
 
 public class Semaphore {
        private long bind; // The C object -- don't touch it
        /**
-        * Semaphore capacity, defined when the semaphore is created. At most capacity 
+        * Semaphore capacity, defined when the semaphore is created. At most capacity
         * process can acquire this semaphore at the same time.
         */
        protected final int capacity;
        /**
-        * Creates a new semaphore with the given capacity. At most capacity 
+        * Creates a new semaphore with the given capacity. At most capacity
         * process can acquire this semaphore at the same time.
         */
        public Semaphore(int capacity) {
@@ -32,7 +32,7 @@ public class Semaphore {
 
 
        /** Locks on the semaphore object until the provided timeout expires
-        * @exception TimeoutException if the timeout expired before 
+        * @exception TimeoutException if the timeout expired before
         *            the semaphore could be acquired.
         * @param timeout the duration of the lock
         */
@@ -67,7 +67,7 @@ public class Semaphore {
 
 
        /** Deletes this semaphore when the GC reclaims it */
-       @Override
+       @Deprecated @Override
        protected void finalize() throws Throwable {
                nativeFinalize();
        }
@@ -80,4 +80,4 @@ public class Semaphore {
                org.simgrid.NativeLib.nativeInit();
                nativeInit();
        }
-}
\ No newline at end of file
+}