Skip to content

Require Java 25 - #3946

Open
akurtakov wants to merge 3 commits into
eclipse-platform:masterfrom
akurtakov:bree-java-25
Open

akurtakov wants to merge 3 commits into
eclipse-platform:masterfrom
akurtakov:bree-java-25

Conversation

@akurtakov

Copy link
Copy Markdown
Member

Raise the BREE of all bundles to JavaSE-25 and bump their minor
versions. The CI builds already use Java 25. This allows using the
Foreign Function & Memory API (final since Java 22) instead of JNI.

@akurtakov

Copy link
Copy Markdown
Member Author

Looking at it now, I'll split tests/examples in separate PRs as with this PR there are 1000+ warnings like "The value of the lambda parameter e is not used" and tests require org.eclipse.test which is Java 25 bundle so they can't be used on 21 already.

@github-actions

github-actions Bot commented Dec 4, 2026 •

Copy link
Copy Markdown
Contributor

Test Results

 1 124 files  ±0   1 124 suites  ±0   1h 28m 44s ⏱️ - 9m 39s
 5 402 tests ±0   5 374 ✅ ±0     28 💤 ±0  0 ❌ ±0 
31 778 runs  ±0  28 202 ✅ ±0  3 576 💤 ±0  0 ❌ ±0 

Results for commit ad75959. ± Comparison against base commit 66873f7.

♻️ This comment has been updated with latest results.

@vogella vogella left a comment

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.

Finally SWT moves to Java 25. This was a long journey

@akurtakov

Copy link
Copy Markdown
Member Author

#3949 takes care of tests and examples which is majority of the noise.

Raise the BREE of all bundles to JavaSE-25 and bump their minor
versions. The CI builds already use Java 25. This allows using the
Foreign Function & Memory API (final since Java 22) instead of JNI.
With Java 25 the compiler warns about every lambda parameter that is
not used. Name these parameters _ (unnamed variables, Java 22).
DeflaterOutputStream does not end a Deflater passed to it, so its
native memory was only freed by the cleaner. Close the Deflater with
try-with-resources; it is AutoCloseable since Java 25, and the compiler
reports the leak.
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