Skip to content

Migrate to Java 25#3705

Open
duanemay wants to merge 7 commits into
developfrom
java25
Open

Migrate to Java 25#3705
duanemay wants to merge 7 commits into
developfrom
java25

Conversation

@duanemay
Copy link
Copy Markdown
Member

  • Replace unused variables with underscore
  • Migrate to IO utility class
  • Use switch expression

Need to update docker files, and uaa-release before merging this

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request migrates the codebase from Java 21 to Java 25, implementing several modern Java features:

  • Replaces unused exception variables with underscore _ (JEP 443 - Unnamed Patterns and Variables)
  • Migrates from System.out.println() to IO.println() utility class
  • Converts traditional switch statements to switch expressions
  • Replaces .get(0) with .getFirst() for better semantics
  • Updates Java version configuration across build and CI/CD files

Reviewed changes

Copilot reviewed 249 out of 250 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
build.gradle Updates Java source and target compatibility from 21 to 25
.github/workflows/*.yml Updates CI/CD pipelines to use Java 25
Test files (multiple) Replaces unused exception variables with _, migrates to IO.println()
Main source files (multiple) Same modernization patterns as test files
Switch statement files Converts to switch expressions in SecurityFilterChainPostProcessor, SimpleSearchQueryConverter, StringUtilities
Collection access files Replaces .get(0) with .getFirst()

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +39 to 42
void main() {
LdapSecurityConstants test = PasswordUtil.findAlgorithm("{sha}YaE1CJ6sVhov987e77A5db7QAPg=".getBytes());
System.out.println(test);
IO.println(test);
}
Copy link

Copilot AI Jan 7, 2026

Choose a reason for hiding this comment

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

The main method signature has been changed from public static void main(String[] args) to void main(). This breaks the standard Java main method contract and will prevent this class from being executed as an entry point. The signature should remain public static void main(String[] args) or follow Java 21+'s new main method conventions with void main(String[] args) if removing the args parameter is intentional.

Copilot uses AI. Check for mistakes.
@duanemay duanemay changed the title Testing: Migrate to Java 25 Migrate to Java 25 Jan 8, 2026
Comment thread .github/workflows/codeql-analysis.yml
@github-project-automation github-project-automation Bot moved this from Inbox to Pending Merge | Prioritized in Foundational Infrastructure Working Group Jan 12, 2026
@duanemay
Copy link
Copy Markdown
Member Author

duanemay commented Mar 19, 2026

Waiting on:

  • ✅ java buildpack support
  • ✅ Bouncy Castle support

duanemay added 7 commits June 5, 2026 13:00
Rewrite Rules applied
- Replace unused variables with underscore
- Migrate to IO utility class
- Use switch expression
Replace assertThatExceptionOfType with assertThatThrownBy
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Pending Merge | Prioritized

Development

Successfully merging this pull request may close these issues.

4 participants