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

[discovery] Fix warnings #4065

Merged
merged 4 commits into from Jan 27, 2024
Merged

[discovery] Fix warnings #4065

merged 4 commits into from Jan 27, 2024

Conversation

jlaur
Copy link
Contributor

@jlaur jlaur commented Jan 24, 2024

This fixes all warnings in org.openhab.core.config.discovery:

One SAT warning remains:

[WARNING] Code Analysis Tool has found:
 0 error(s)!
 1 warning(s)
[WARNING] org.openhab.core.config.discovery.AbstractThingHandlerDiscoveryService.java:[45]
There is no need for a @NonNull annotation because it is set as default. Only @Nullable should be used

// this works around a bug in ecj: @NonNullByDefault({}) complains about the field not being
// initialized when the type is generic, so we have to initialize it with "something"
protected @NonNullByDefault({}) T thingHandler = (@NonNull T) null;

Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
Signed-off-by: Jacob Laursen <jacob-github@vindvejr.dk>
@jlaur jlaur requested a review from a team as a code owner January 24, 2024 21:40
Copy link
Member

@J-N-K J-N-K left a comment

Choose a reason for hiding this comment

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

LGTM.

@J-N-K J-N-K added the enhancement An enhancement or new feature of the Core label Jan 27, 2024
@J-N-K J-N-K added this to the 4.2 milestone Jan 27, 2024
@J-N-K J-N-K merged commit 5b9fee7 into openhab:main Jan 27, 2024
3 checks passed
@jlaur jlaur deleted the discovery-fix-warnings branch April 7, 2024 12:26
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 of the Core
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants