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

[miele] Refactor mDNS discovery #11873

Merged
merged 2 commits into from
Dec 28, 2021

Conversation

jlaur
Copy link
Contributor

@jlaur jlaur commented Dec 28, 2021

Signed-off-by: Jacob Laursen jacob-github@vindvejr.dk

Brought back some minor stashed refactoring done while investigating #11837, which was fixed by openhab/openhab-core#2635 and #11834:

  • Added nullness annotations, and with that fixed: Unsafe null type conversion (type annotations)
  • Fixed warning: The import org.openhab.core.config.discovery.mdns.internal.MDNSDiscoveryService is never used
  • Fixed error handling problem that could lead to discovery result without any properties.
  • Localized discovery result label.
  • Simplified some code by having constants on left-side.
  • Reduced nesting.
  • Reduce log level from error to warning when failing to create discovery result.

Fix error handling.

Localize discovery result label.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@jlaur jlaur requested a review from kgoderis as a code owner December 28, 2021 09:27
@lolodomo lolodomo added the enhancement An enhancement or new feature for an existing add-on label Dec 28, 2021
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
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.

LGTM

@lolodomo lolodomo merged commit 5e3bddf into openhab:main Dec 28, 2021
@lolodomo lolodomo added this to the 3.3 milestone Dec 28, 2021
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Dec 30, 2021
* Add nullness annotations.
* Fix error handling.
* Localize discovery result label.
* Reduce log level to warning for error creating discovery result.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Nick Waterton <n.waterton@outlook.com>
mischmidt83 pushed a commit to mischmidt83/openhab-addons that referenced this pull request Jan 9, 2022
* Add nullness annotations.
* Fix error handling.
* Localize discovery result label.
* Reduce log level to warning for error creating discovery result.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Michael Schmidt <mi.schmidt.83@gmail.com>
moesterheld pushed a commit to moesterheld/openhab-addons that referenced this pull request Jan 18, 2022
* Add nullness annotations.
* Fix error handling.
* Localize discovery result label.
* Reduce log level to warning for error creating discovery result.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jan 28, 2022
* Add nullness annotations.
* Fix error handling.
* Localize discovery result label.
* Reduce log level to warning for error creating discovery result.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@jlaur jlaur deleted the 11837-miele-discovery-refactoring branch June 13, 2022 18:49
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
* Add nullness annotations.
* Fix error handling.
* Localize discovery result label.
* Reduce log level to warning for error creating discovery result.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Nov 12, 2022
* Add nullness annotations.
* Fix error handling.
* Localize discovery result label.
* Reduce log level to warning for error creating discovery result.

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Andras Uhrin <andras.uhrin@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature for an existing add-on
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants