-
Notifications
You must be signed in to change notification settings - Fork 0
chore: clean up code #166
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
chore: clean up code #166
Conversation
There was a problem hiding this 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 |
|
@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 :). |
|
Hello @nyg |
Ran some OpenRewrite recipes (e.g. https://docs.openrewrite.org/recipes/java/migrate/upgradetojava17) to modernize and simplify code base.
Also removed the
sitefolder if that's ok.