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

Cleanup code #458

Merged
merged 1 commit into from
Jan 10, 2024
Merged

Cleanup code #458

merged 1 commit into from
Jan 10, 2024

Conversation

wborn
Copy link
Member

@wborn wborn commented Jan 9, 2024

This cleanup includes:

  • Fix deprecations
  • Fix format argument mismatches
  • Fix JavaDocs
  • Fix typos
  • Remove redundant boxing
  • Remove redundant imports
  • Remove redundant modifiers
  • Remove redundant toString calls
  • Remove redundant variable initialization
  • Use diamond operator
  • Use enhanced for loops
  • Use secure URLs with XML
  • Use try-with-resources with Files.list
  • Replace Collectors.joining with String.join
  • Replace lambdas with method references

This cleanup includes:

* Fix deprecations
* Fix format argument mismatches
* Fix JavaDocs
* Fix typos
* Remove redundant boxing
* Remove redundant imports
* Remove redundant modifiers
* Remove redundant toString calls
* Remove redundant variable initialization
* Use diamond operator
* Use enhanced for loops
* Use secure URLs with XML
* Use try-with-resources with Files.list
* Replace Collectors.joining with String.join
* Replace lambdas with method references

Signed-off-by: Wouter Born <[email protected]>
@wborn wborn requested a review from a team as a code owner January 9, 2024 20:55
Copy link
Member

@kaikreuzer kaikreuzer left a comment

Choose a reason for hiding this comment

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

Cool, thanks.

May I ask which AI process you are using to catch and fix all those things?

@kaikreuzer kaikreuzer merged commit 8d02268 into openhab:main Jan 10, 2024
3 checks passed
@kaikreuzer kaikreuzer added this to the 0.16.0 milestone Jan 10, 2024
@wborn
Copy link
Member Author

wborn commented Jan 10, 2024

IntelliJ IDEA helps me find all these issues and it can also fix most automatically which saves a lot of time and regressions!
Usually I analyze all the code and only fix a subset of all the found issues.
It can also analyze all code using one rule which helps if you want to fix one or two problems in a lot of code like openhab/openhab-addons#16249.
I use both Eclipse and IntelliJ IDEA but didn't use IDEA yet with openHAB.

@wborn wborn deleted the cleanup-code branch January 10, 2024 09:02
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