Skip to content

Apply Java modernization idioms across the codebase#1757

Closed
eunseo9311 wants to merge 1 commit intospring-io:mainfrom
eunseo9311:refactor/java-modernization
Closed

Apply Java modernization idioms across the codebase#1757
eunseo9311 wants to merge 1 commit intospring-io:mainfrom
eunseo9311:refactor/java-modernization

Conversation

@eunseo9311
Copy link
Copy Markdown
Contributor

Title: Apply Java modernization idioms across the codebase

Apply Java modernization idioms across the codebase

Summary

  • Replace String.format() with String.formatted() to align with the convention already established by project maintainers since May 2023
  • Apply instanceof pattern matching (Java 16+) to remaining old-style instanceof checks with explicit casts, consistent with the 38 instances already using the modern syntax

Details

  • 31 files changed, 66 insertions, 66 deletions (pure refactoring, no behavioral changes)
  • All changes are mechanical replacements with identical semantics
  • Spring JavaFormat applied and all tests pass

Test plan

  • ./mvnw clean install passes
  • ./mvnw spring-javaformat:apply produces no additional changes
  • ./mvnw validate (checkstyle) passes

Replace String.format() with String.formatted() and apply
instanceof pattern matching to align with the established
conventions already used throughout the project.

Signed-off-by: eunseo9311 <eunseo9311@gmail.com>
Signed-off-by: Eunseo Song <162149585+eunseo9311@users.noreply.github.com>
@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Feb 23, 2026
@eunseo9311
Copy link
Copy Markdown
Contributor Author

The CI failure is caused by a transient javadoc.io outage (HTTP 521) during Javadoc generation in the initializr-docs module, unrelated to the changes in this PR.

Could you re-run the CI when you get a chance?

@mhalbritter mhalbritter self-assigned this Feb 23, 2026
@mhalbritter mhalbritter added type: task and removed status: waiting-for-triage An issue we've not yet triaged labels Feb 23, 2026
@mhalbritter mhalbritter added this to the 0.24.0 milestone Feb 23, 2026
mhalbritter pushed a commit that referenced this pull request Feb 23, 2026
Replace String.format() with String.formatted() and apply
instanceof pattern matching to align with the established
conventions already used throughout the project.

See gh-1757

Signed-off-by: eunseo9311 <eunseo9311@gmail.com>
Signed-off-by: Eunseo Song <162149585+eunseo9311@users.noreply.github.com>
@mhalbritter
Copy link
Copy Markdown
Contributor

Thanks @eunseo9311 !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants