Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Java 17 features in source code #1186

Merged
merged 1 commit into from
Sep 13, 2024

Conversation

MarkEWaite
Copy link
Contributor

@MarkEWaite MarkEWaite commented Sep 13, 2024

Use Java 17 features in source code

Open Rewrite migrate to Java 17 provided the transformations and they all pass automated tests.

Several nice readability improvements are provided by Java 17.

Testing done

Automated tests pass.

Submitter checklist

  • Make sure you are opening from a topic/feature/bugfix branch (right side) and not your main branch!
  • Ensure that the pull request title represents the desired changelog entry
  • Please describe what you did
  • Link to relevant issues in GitHub or Jira
  • Link to relevant pull requests, esp. upstream and downstream changes
  • Ensure you have provided tests - that demonstrates feature works or fixes the issue

https://docs.openrewrite.org/running-recipes/popular-recipe-guides/migrate-to-java-17
provided the transformations and they all pass automated tests.

Several nice readability improvements are provided by Java 17.
@MarkEWaite MarkEWaite requested a review from a team as a code owner September 13, 2024 00:25
@MarkEWaite MarkEWaite added the chore Reduces maintenance effort by changes not directly visible to users label Sep 13, 2024
@github-actions github-actions bot added the tests Automated test addition or improvement label Sep 13, 2024
@MarkEWaite MarkEWaite removed the tests Automated test addition or improvement label Sep 13, 2024
@MarkEWaite MarkEWaite merged commit 0f8f753 into jenkinsci:master Sep 13, 2024
17 checks passed
@MarkEWaite MarkEWaite deleted the use-java-17-source-code branch September 13, 2024 03:34
MarkEWaite added a commit to MarkEWaite/docker-lfs that referenced this pull request Sep 13, 2024
@rsandell
Copy link
Member

Nice!
Though I am personally allergic to plugins that require newer Java versions than the Jenkins Core version they depend on, maybe you changed that dependency/pom in another PR?.

@MarkEWaite
Copy link
Contributor Author

Nice! Though I am personally allergic to plugins that require newer Java versions than the Jenkins Core version they depend on, maybe you changed that dependency/pom in another PR?.

I agree with you that requiring newer Java versions in this plugin is very fast. This is a very special case for its transition to Java 17 because JGit 7.0.0, requires Java 17. Other plugins (like the git plugin) do not need that fast paced transition to Java 17. More details about the transition of this plugin to Java 17 are available in:

The plugin does not require a newer Java version than the Jenkins version core on which it depends. It requires Jenkins 2.463 or newer which is the first Jenkins weekly version that requires Java 17. Users of the Jenkins LTS won't see this upgrade until the 30 Oct 2024 Jenkins LTS release that requires Java 17 or newer.

@MarkEWaite
Copy link
Contributor Author

MarkEWaite commented Sep 13, 2024

I think that this plugin should make its next transition to Jakarta EE 9 and Spring Security 6.x soon after we release the 30 Oct 2024 LTS because I don't think it is healthy in the long term to have this plugin use a weekly release as its minimum Jenkins version baseline.

The draft pull request that proposes that change is:

Does that make sense to others or am I missing something there?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Reduces maintenance effort by changes not directly visible to users
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants