Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -1019,7 +1019,7 @@ subprojects {
}

if (project.name.is("checker")) {
dependsOn("jtregJdk11Tests", "nullnessExtraTests", "commandLineTests", "tutorialTests")
dependsOn("nullnessExtraTests", "commandLineTests", "tutorialTests")
Comment thread
coderabbitai[bot] marked this conversation as resolved.
}

if (project.name.is("dataflow")) {
Expand Down
36 changes: 0 additions & 36 deletions checker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -301,42 +301,6 @@ tasks.register("allResourceLeakTests", Test) {
}
}

// These are tests that should only be run with JDK 11+.
tasks.register("jtregJdk11Tests", Exec) {
description = "Run the jtreg tests made for JDK 11+."
group = "Verification"
dependsOn("compileJava")
dependsOn("compileTestJava")
dependsOn("shadowJar")

String jtregOutput = "${buildDir}/jtregJdk11"
String name = "all"
executable = "jtreg"
args = [
"-dir:${projectDir}/jtregJdk11",
"-workDir:${jtregOutput}/${name}/work",
"-reportDir:${jtregOutput}/${name}/report",
"-verbose:summary",
"-javacoptions:-g",
"-keywords:!ignore",
"-samevm",
"-javacoptions:-classpath ${tasks.shadowJar.archiveFile.get()}:${sourceSets.test.output.asPath}",
"-vmoptions:-classpath ${tasks.shadowJar.archiveFile.get()}:${sourceSets.test.output.asPath}",
"-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED",
"-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED",
"-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED",
"-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED",
"-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED",
"-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED",
"-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED",
"-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED",
"-vmoptions:--add-opens=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED",
"-javacoptions:-classpath ${sourceSets.testannotations.output.asPath}",
// Location of jtreg tests
"."
]
}

// JSpecify tests are excluded by default. To run them:
// ./gradlew NullnessJSpecifySamplesTest
test {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/*
* @test
* @summary Test that --release 8 does not cause a crash.
* @summary Test that --release 9 does not cause a crash.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

Summary now contradicts the test’s actual release target.

Line 3 says --release 9, but Line 5 and Line 8 still clearly define a release-8 test (--release 8, Jdk11Release8). Please keep these aligned; otherwise the test intent is misleading.

Suggested fix
- * `@summary` Test that --release 9 does not cause a crash.
+ * `@summary` Test that --release 8 does not cause a crash.

Based on learnings: In the Checker Framework repository, when doing refactoring PRs, test files should remain stable and not be changed unless necessary.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
* @summary Test that --release 9 does not cause a crash.
* `@summary` Test that --release 8 does not cause a crash.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@checker/jtreg/Jdk11Release9.java` at line 3, The test summary was incorrectly
changed to "--release 9" while the test class and run flags target release 8;
revert the summary back to "--release 8" so the header, the run flags (the
--release 8 invocation), and the test class name (Jdk11Release8) all remain
consistent. Locate the Jdk11Release9.java header summary line and replace the
text to match "--release 8" (or alternatively rename the file/class and run
flags to 9 if you truly intend a 9-target test), but prefer reverting the
summary to 8 to keep the test stable.

*
* @compile -processor org.checkerframework.checker.interning.InterningChecker Jdk11Release8.java --release 8
* @compile -processor org.checkerframework.checker.interning.InterningChecker Jdk11Release9.java --release 9
*/

public class Jdk11Release8 {}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

Critical: Class name must match filename.

The class name Jdk11Release8 doesn't match the filename Jdk11Release9.java. This will cause a compilation error, as public class names must match their file names in Java.

🐛 Proposed fix
-public class Jdk11Release8 {}
+public class Jdk11Release9 {}
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
public class Jdk11Release8 {}
public class Jdk11Release9 {}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@checker/jtreg/Jdk11Release9.java` at line 8, The public class declaration
currently uses the name Jdk11Release8 (class Jdk11Release8) which does not match
the file name Jdk11Release9.java; update the class name to Jdk11Release9 (or
rename the file to match the class) so the public class name matches the
filename, ensuring the declaration public class Jdk11Release9 {} replaces the
existing class identifier.

5 changes: 0 additions & 5 deletions checker/jtregJdk11/TEST.ROOT

This file was deleted.

Loading