Skip to content

Conversation

@nyg
Copy link

@nyg nyg commented Oct 12, 2025

Ran some OpenRewrite recipes (e.g. https://docs.openrewrite.org/recipes/java/migrate/upgradetojava17) to modernize and simplify code base.

Also removed the site folder if that's ok.

@nyg nyg changed the title Cleanup Code cleanup Oct 12, 2025
@nyg nyg changed the title Code cleanup chore: clean up code Oct 12, 2025
@LeMyst LeMyst requested a review from Copilot October 13, 2025 13:55
Copy link

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 modernizes the JMXTerm codebase by applying OpenRewrite recipes to upgrade to Java 17 standards and clean up deprecated patterns. The changes focus on adopting modern Java features like enhanced switch expressions, pattern matching, try-with-resources, and updated API usage.

Key changes include:

  • Modernized Java syntax using Java 17 features (pattern matching, text blocks, enhanced switch)
  • Updated exception handling with multi-catch blocks and try-with-resources
  • Replaced deprecated API calls with modern alternatives
  • Code cleanup including removal of unnecessary casts and verbose anonymous classes

Reviewed Changes

Copilot reviewed 43 out of 49 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
Test files (multiple) Modernized test code with updated API usage and exception handling
Command classes Updated command implementations with Java 17 syntax and modern patterns
Utility classes Applied modern Java practices and updated API calls
Boot classes Simplified main class and options with modern syntax
Site files Removed legacy site documentation files

@nyg
Copy link
Author

nyg commented Oct 13, 2025

@LeMyst I would discard all 5 Copilot comments. All the methods I changed were marked as deprecated in the current Apache Commons version used, and as the code builds and runs it means the new ones do exist :).

@LeMyst LeMyst merged commit 71f91e9 into LeMyst:main Oct 14, 2025
6 checks passed
@LeMyst
Copy link
Owner

LeMyst commented Oct 14, 2025

Hello @nyg
Thanks for your work, everything is OK for me

@nyg nyg deleted the cleanup branch October 15, 2025 16:47
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