Address review comments

This commit is contained in:
Jeroen Ketema
2026-07-23 13:22:43 +02:00
parent c95a8ab9d2
commit 9976a7a3ac
2 changed files with 13 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ public class SubstResolver {
boolean loaded = false;
if (File.separatorChar == '\\') {
String dist = System.getenv("CODEQL_DIST");
if (dist != null && !dist.isEmpty()) {
if (dist != null && !dist.isEmpty()) {
try {
Path library = Paths.get(dist).resolve("tools")
.resolve("win64").resolve("canonicalize.dll").toAbsolutePath();
@@ -61,7 +61,12 @@ public class SubstResolver {
return f;
}
String resolved = nativeResolveSubst(path.substring(0, 3));
String resolved;
try {
resolved = nativeResolveSubst(path.substring(0, 3));
} catch (UnsatisfiedLinkError ignored) {
return f;
}
if (resolved == null) {
return f;
}