Skip to content

Support JDK 26#1865

Merged
msridhar merged 5 commits intowala:masterfrom
msridhar:jdk-26
Mar 20, 2026
Merged

Support JDK 26#1865
msridhar merged 5 commits intowala:masterfrom
msridhar:jdk-26

Conversation

@msridhar
Copy link
Copy Markdown
Member

@msridhar msridhar commented Mar 19, 2026

As usual, we have not tested any new bytecode features of JDK 26, so they may not work. But, WALA can now accept class files generated by JDK 26.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 19, 2026

Test Results

  971 files  +123    971 suites  +123   6h 23m 42s ⏱️ + 59m 53s
  800 tests ±  0    781 ✅ ±  0   19 💤 ± 0  0 ❌ ±0 
6 284 runs  +800  6 130 ✅ +781  154 💤 +19  0 ❌ ±0 

Results for commit 98bd5d5. ± Comparison against base commit 60c1e36.

♻️ This comment has been updated with latest results.

@msridhar
Copy link
Copy Markdown
Member Author

The issue here is that java.lang.Process implements AutoCloseable on JDK 26 but not before:

https://www.oracle.com/java/technologies/javase/26-relnote-issues.html#JDK-8364361

On JDK 26, ECJ gives leak reports, some of which can't be fixed on previous JDK versions since Process has no close method there. But, if I suppress, on previous JDK versions ECJ complains of an unnecessary suppression.

@liblit I think the solution here, if it works, is to pass the the equivalent of javac's --release flag to ECJ, so it knows which API version we are targeting (JDK 11). Do you know if that is possible, and if so, could you possibly look into it in a separate PR? Right now we pass -source and -target flags but I think / hope --release is supported by ECJ.

@liblit
Copy link
Copy Markdown
Contributor

liblit commented Mar 19, 2026

Investigating. 🕵️‍♂️

@liblit
Copy link
Copy Markdown
Contributor

liblit commented Mar 19, 2026

After #1866, these extra leak suppressions for Process will no longer be needed. I have verified that both of the following pass all GitHub CI tests:

@msridhar msridhar changed the title [draft] Support JDK 26 Support JDK 26 Mar 19, 2026
@msridhar msridhar marked this pull request as ready for review March 19, 2026 21:59
@msridhar msridhar requested a review from liblit March 19, 2026 21:59
@msridhar msridhar enabled auto-merge March 19, 2026 22:45
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 19, 2026

Codecov Report

❌ Patch coverage is 0% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 50.37%. Comparing base (60c1e36) to head (98bd5d5).
⚠️ Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...java/com/ibm/wala/shrike/shrikeCT/ClassReader.java 0.00% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff            @@
##             master    #1865   +/-   ##
=========================================
  Coverage     50.37%   50.37%           
- Complexity    12646    12647    +1     
=========================================
  Files          1365     1365           
  Lines         84813    84813           
  Branches      14470    14470           
=========================================
+ Hits          42726    42728    +2     
+ Misses        37344    37343    -1     
+ Partials       4743     4742    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@msridhar msridhar added this pull request to the merge queue Mar 19, 2026
Merged via the queue into wala:master with commit 254ab54 Mar 20, 2026
14 checks passed
@msridhar msridhar deleted the jdk-26 branch March 20, 2026 00:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants