MCPcopy Create free account
hub / github.com/questdb/questdb / isJlinkRuntime

Method isJlinkRuntime

core/src/main/java/io/questdb/std/Os.java:266–274  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

264 private static native int setCurrentThreadAffinity0(int cpu);
265
266 private static boolean isJlinkRuntime() {
267 // Detect jlink-ed runtime by checking if CodeSource uses jrt: protocol
268 CodeSource codeSource = Os.class.getProtectionDomain().getCodeSource();
269 if (codeSource == null) {
270 return false;
271 }
272 URL location = codeSource.getLocation();
273 return location != null && "jrt".equals(location.getProtocol());
274 }
275
276 @Nullable
277 public static String getNativeLibsDir(String libName) {

Callers 1

getNativeLibsDirMethod · 0.95

Calls 2

getLocationMethod · 0.80
equalsMethod · 0.65

Tested by

no test coverage detected