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 Java code #2263

Merged
merged 3 commits into from
Jan 17, 2024
Merged

Cleanup Java code #2263

merged 3 commits into from
Jan 17, 2024

Conversation

wborn
Copy link
Member

@wborn wborn commented Jan 8, 2024

This cleanup includes:

  • Fix deprecations
  • Fix JavaDocs
  • Remove redundant toString calls
  • Remove redundant semicolons
  • Simplify boolean expressions
  • Use diamond operator
  • Use enhanced for loops
  • Use instanceof pattern matching
  • Use isEmpty instead of 0 comparisons
  • Use lambdas
  • Use static inner classes
  • Use StandardCharsets

Also adds the SA_LOCAL_SELF_COMPARISON suppression similar as used in other repositories for spotbugs/spotbugs#1992.

@wborn wborn requested review from ghys, peuter and a team as code owners January 8, 2024 18:10
This cleanup includes:

* Fix deprecations
* Fix JavaDocs
* Remove redundant toString calls
* Remove redundant semicolons
* Simplify boolean expressions
* Use diamond operator
* Use enhanced for loops
* Use instanceof pattern matching
* Use isEmpty instead of 0 comparisons
* Use lambdas
* Use static inner classes
* Use StandardCharsets

Also adds the SA_LOCAL_SELF_COMPARISON suppression similar as used in other repositories for spotbugs/spotbugs#1992.

Signed-off-by: Wouter Born <github@maindrain.net>
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

Review of changes in Basic UI

Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

OK for Basic UI.
Not reviewed for other UIs.

Copy link
Member

@ghys ghys left a comment

Choose a reason for hiding this comment

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

As far as HABot and HABPanel are concerned, these seem okay to me (but mostly I trust @wborn 😉)

@wborn
Copy link
Member Author

wborn commented Jan 14, 2024

IntelliJ cleaned up most code which I trust. 😉

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.

Thanks!

@kaikreuzer kaikreuzer merged commit ef52364 into openhab:main Jan 17, 2024
3 checks passed
@kaikreuzer kaikreuzer added this to the 4.2 milestone Jan 17, 2024
@wborn wborn deleted the cleanup-java-code branch January 17, 2024 18:11
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.

None yet

4 participants