From 96712b0ba2061742a16360dd9688aec2146519e7 Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Thu, 29 Aug 2024 16:52:37 -0400 Subject: [PATCH 1/3] Build CFI on Java 21 --- .github/workflows/main.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 7af63409..7834987f 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,7 +14,7 @@ jobs: fail-fast: false matrix: group: [ cfi-tests, downstream-ontology, downstream-security-demo, downstream-universe ] - jdk: [ 8, 11, 17 ] + jdk: [ 8, 11, 17, 21] runs-on: ubuntu-latest steps: - name: Install dependencies @@ -52,7 +52,7 @@ jobs: python3 -m pip install --upgrade pip if [ -f requirements.txt ]; then pip install -r requirements.txt; fi - name: Spotless Check - if: matrix.jdk == 11 || matrix.jdk == 17 + if: matrix.jdk != 8 run: ./gradlew spotlessCheck - name: Build run: | From 7cb51c788a488d527db147a3107317637e3e3b0e Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Thu, 29 Aug 2024 17:13:38 -0400 Subject: [PATCH 2/3] Fix deprecation warning --- .../inference/solver/backend/logiql/LogicBloxRunner.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/checkers/inference/solver/backend/logiql/LogicBloxRunner.java b/src/checkers/inference/solver/backend/logiql/LogicBloxRunner.java index 98026832..ed979b4f 100644 --- a/src/checkers/inference/solver/backend/logiql/LogicBloxRunner.java +++ b/src/checkers/inference/solver/backend/logiql/LogicBloxRunner.java @@ -56,7 +56,8 @@ public void runLogicBlox() { */ private void getOutPut_Error(String command, final int i) throws IOException, InterruptedException { - final Process p = Runtime.getRuntime().exec(command); + ProcessBuilder processBuilder = new ProcessBuilder(command.split(" ")); + final Process p = processBuilder.start(); Thread getOutPut = new Thread() { @Override From cd88deef3da0ce9a5de126768ec49bd28d3e83fa Mon Sep 17 00:00:00 2001 From: Aosen Xiong Date: Fri, 30 Aug 2024 15:03:03 -0400 Subject: [PATCH 3/3] Suppress deprecation warning for Java21 --- testdata/ostrusted-not-inferrable-test/RuntimeExec.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testdata/ostrusted-not-inferrable-test/RuntimeExec.java b/testdata/ostrusted-not-inferrable-test/RuntimeExec.java index b530ab27..f682adbe 100644 --- a/testdata/ostrusted-not-inferrable-test/RuntimeExec.java +++ b/testdata/ostrusted-not-inferrable-test/RuntimeExec.java @@ -3,7 +3,7 @@ import java.io.File; import java.io.IOException; - +@SuppressWarnings("deprecation") class RuntimeExec { @OsTrusted String trustedField = "";