Skip to content

Upgrade Eclipse project Java levels during Java migrations - #1475

Merged
jkschneider merged 3 commits into
mainfrom
eclipse-java-version
Nov 19, 2026
Merged

jkschneider merged 3 commits into
mainfrom
eclipse-java-version

Conversation

@jkschneider

@jkschneider jkschneider commented Nov 19, 2026 •

Copy link
Copy Markdown
Member

UpgradeJavaVersion now updates standard Java execution environments in Eclipse .classpath and the source, target platform, and compliance keys in .settings/org.eclipse.jdt.core.prefs. The recipe also handles the LST plain-text representation of those files, preserving formatting, custom VM labels, and newer levels.

For projects whose Eclipse Java levels increase, update existing Bundle-RequiredExecutionEnvironment entries and standard JavaSE osgi.ee equality or minimum-version filters in META-INF/MANIFEST.MF. Preserve manifest line folding, named sections, and unrelated headers and capabilities. OSGi Java execution environments

Tests cover structured and plain-text Eclipse inputs, CRLF and final-newline behavior, legacy version spelling, newer/custom values, folded manifest headers, and manifests in projects whose Eclipse Java levels stay unchanged.

Source-built run 20261119192607-puIFR on the existing YANG Design Studio LST emitted the expected eight files: three classpaths, two prefs files, and three PDE manifests. A byte comparison after applying the patch to a scratch copy confirmed that only the version values changed. The actual manifests use Bundle-RequiredExecutionEnvironment, while the osgi.ee filter is exercised by the regression tests. The CLI reports no supported build tool for this repository, so this replay verifies metadata output.

The isolated migrate-java module suite passed with 3,019 tests, 15 skipped, and zero failures or errors.

@jkschneider
jkschneider merged commit 95d2941 into main Nov 19, 2026
1 check passed
@jkschneider
jkschneider deleted the eclipse-java-version branch November 19, 2026 23:02
@github-project-automation github-project-automation Bot moved this from In Progress to Done in OpenRewrite Nov 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

1 participant