diff --git a/java/kotlin-extractor/src/main/java/com/semmle/extractor/java/OdasaOutput.java b/java/kotlin-extractor/src/main/java/com/semmle/extractor/java/OdasaOutput.java index 435dc85513ee..ef7df5d4053b 100644 --- a/java/kotlin-extractor/src/main/java/com/semmle/extractor/java/OdasaOutput.java +++ b/java/kotlin-extractor/src/main/java/com/semmle/extractor/java/OdasaOutput.java @@ -78,13 +78,11 @@ public class OdasaOutput { } public OdasaOutput(boolean trackClassOrigins, Compression compression, Logger log) { - String trapFolderVar = Env.systemEnv().getFirstNonEmpty("CODEQL_EXTRACTOR_JAVA_TRAP_DIR", - Var.TRAP_FOLDER.name()); + String trapFolderVar = Env.systemEnv().get("CODEQL_EXTRACTOR_JAVA_TRAP_DIR"); if (trapFolderVar == null) { throw new ResourceError("CODEQL_EXTRACTOR_JAVA_TRAP_DIR was not set"); } - String sourceArchiveVar = Env.systemEnv().getFirstNonEmpty("CODEQL_EXTRACTOR_JAVA_SOURCE_ARCHIVE_DIR", - Var.SOURCE_ARCHIVE.name()); + String sourceArchiveVar = Env.systemEnv().get("CODEQL_EXTRACTOR_JAVA_SOURCE_ARCHIVE_DIR"); if (sourceArchiveVar == null) { throw new ResourceError("CODEQL_EXTRACTOR_JAVA_SOURCE_ARCHIVE_DIR was not set"); } diff --git a/java/kotlin-extractor/src/main/java/com/semmle/util/process/Env.java b/java/kotlin-extractor/src/main/java/com/semmle/util/process/Env.java index 2edfbb3e1647..564887f5fda1 100644 --- a/java/kotlin-extractor/src/main/java/com/semmle/util/process/Env.java +++ b/java/kotlin-extractor/src/main/java/com/semmle/util/process/Env.java @@ -256,8 +256,6 @@ public enum Var { */ ODASA_SRC, ODASA_DB, - TRAP_FOLDER, - SOURCE_ARCHIVE, ODASA_OUTPUT, ODASA_SUBPROJECT_THREADS, diff --git a/java/ql/lib/change-notes/2024-07-25-env-vars.md b/java/ql/lib/change-notes/2024-07-25-env-vars.md new file mode 100644 index 000000000000..8c58be3b4126 --- /dev/null +++ b/java/ql/lib/change-notes/2024-07-25-env-vars.md @@ -0,0 +1,4 @@ +--- +category: breaking +--- +* The Java and Kotlin extractors no longer support the `SOURCE_ARCHIVE` and `TRAP_FOLDER` legacy environment variable.