X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/d13b1659a0c2551ee41b287a269e391bb2d7bc8a..cdd638ea027eff26979839b7fa8cbf9ddcc09e09:/src/bindings/java/org/simgrid/msg/RngStream.java diff --git a/src/bindings/java/org/simgrid/msg/RngStream.java b/src/bindings/java/org/simgrid/msg/RngStream.java index 49e7ac3b9f..e286c4a2e3 100644 --- a/src/bindings/java/org/simgrid/msg/RngStream.java +++ b/src/bindings/java/org/simgrid/msg/RngStream.java @@ -41,13 +41,9 @@ public class RngStream { * The natively implemented method to create a C RngStream object. */ private native void create(String name); - @Override - protected void finalize() { - try { - nativeFinalize(); - } catch (Throwable e) { - e.printStackTrace(); - } + + protected void finalize() throws Throwable{ + nativeFinalize(); } /** * Release the C RngStream object @@ -61,7 +57,7 @@ public class RngStream { * must all be less than m1 = 4294967087, and not all 0; and the last 3 values must all be less * than m2 = 4294944443, and not all 0. Returns false for invalid seeds, and true otherwise. */ - public static native boolean setPackageSeed(int seed[]); + public static native boolean setPackageSeed(int[] seed); /** * Reinitializes the stream g to its initial state: Cg and Bg are set to Ig . */ @@ -87,11 +83,11 @@ public class RngStream { * the initial seeds of the streams are no longer spaced Z values apart. We discourage the use of * this procedure. Returns false for invalid seeds, and true otherwise. */ - public native boolean setSeed(int seed[]); + public native boolean setSeed(int[] seed); /** * Advances the state of the stream by k values, without modifying the states of other streams (as - * in RngStream_SetSeed), nor the values of Bg and Ig associated with this stream. If e > 0, then - * k = 2e + c; if e < 0, then k = -2-e + c; and if e = 0, then k = c. Note: c is allowed to take + * in RngStream_SetSeed), nor the values of Bg and Ig associated with this stream. If e > 0, then + * k = 2e + c; if e < 0, then k = -2-e + c; and if e = 0, then k = c. Note: c is allowed to take * negative values. We discourage the use of this procedure. */ public native void advanceState(int e, int g); @@ -113,7 +109,7 @@ public class RngStream { */ public static native void nativeInit(); static { - Msg.nativeInit(); + org.simgrid.NativeLib.nativeInit(); nativeInit(); } -} \ No newline at end of file +}