|
18 | 18 |
|
19 | 19 | import static java.util.UUID.randomUUID; |
20 | 20 |
|
| 21 | +import com.sun.jna.Library; |
| 22 | +import com.sun.jna.NativeLibrary; |
21 | 23 | import java.io.File; |
22 | 24 | import java.io.IOException; |
23 | 25 | import java.io.InputStream; |
|
29 | 31 | import java.util.concurrent.ConcurrentMap; |
30 | 32 | import org.apache.arrow.gandiva.exceptions.GandivaException; |
31 | 33 |
|
32 | | -import com.sun.jna.Library; |
33 | | -import com.sun.jna.NativeLibrary; |
34 | | - |
35 | 34 | /** This class handles loading of the jni library, and acts as a bridge for the native functions. */ |
36 | 35 | class JniLoader { |
37 | 36 | private static final String LIBRARY_NAME = "gandiva_jni"; |
38 | | - |
| 37 | + |
39 | 38 | private static final int RTLD_GLOBAL = 0x00100; |
40 | | - private static final int RTLD_LAZY = 0x00001; |
| 39 | + private static final int RTLD_LAZY = 0x00001; |
41 | 40 |
|
42 | 41 | private static volatile JniLoader INSTANCE; |
43 | 42 | private static volatile long defaultConfiguration = 0L; |
@@ -78,8 +77,7 @@ private static void loadGandivaLibraryFromJar(final String tmpDir) |
78 | 77 | final File libraryFile = moveFileFromJarToTemp(tmpDir, libraryToLoad, LIBRARY_NAME); |
79 | 78 | NativeLibrary.getInstance( |
80 | 79 | libraryFile.getAbsolutePath(), |
81 | | - Collections.singletonMap(Library.OPTION_OPEN_FLAGS, new Integer(RTLD_LAZY | RTLD_GLOBAL)) |
82 | | - ); |
| 80 | + Collections.singletonMap(Library.OPTION_OPEN_FLAGS, new Integer(RTLD_LAZY | RTLD_GLOBAL))); |
83 | 81 | System.load(libraryFile.getAbsolutePath()); |
84 | 82 | } |
85 | 83 |
|
|
0 commit comments