Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Update copyright lines.
[simgrid.git] / src / bindings / java / org / simgrid / NativeLib.java
index 6fb3c7f..7bb2b10 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2019. The SimGrid Team. All rights reserved.          */
+/* Copyright (c) 2014-2021. 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. */
@@ -14,11 +14,11 @@ import java.util.stream.Stream;
 
 /** Helper class loading the native functions of SimGrid that we use for downcalls
  *
- * Almost all org.simgrid.msg.* classes contain a static bloc (thus executed when the class is loaded)
+ * Almost all org.simgrid.msg.* classes contain a static block (thus executed when the class is loaded)
  * containing a call to this.
  */
 public final class NativeLib {
-       private static final boolean windowsOs = System.getProperty("os.name").toLowerCase().startsWith("win");
+       private static final boolean WINDOWS_OS = System.getProperty("os.name").toLowerCase().startsWith("win");
        private static boolean isNativeInited = false;
        private static Path tempDir = null; // where the embeeded libraries are unpacked before loading them
 
@@ -42,7 +42,7 @@ public final class NativeLib {
                if (isNativeInited)
                        return;
 
-               if (windowsOs)
+               if (WINDOWS_OS)
                        NativeLib.nativeInit("winpthread-1");
 
                NativeLib.nativeInit("simgrid");
@@ -92,7 +92,7 @@ public final class NativeLib {
                if (tempDir == null) {
                        final String tempPrefix = "simgrid-java-";
 
-                       if (windowsOs) {
+                       if (WINDOWS_OS) {
                                // The cleanup at exit fails on Windows where it is impossible to delete files which are still in
                                // use.  Try to remove stale temporary files from previous executions, and limit disk usage.
                                Path tmpdir = (new File(System.getProperty("java.io.tmpdir"))).toPath();