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

[insteon] Prevent null values from being inferred when printing to console #12243

Merged
merged 1 commit into from
Feb 8, 2022

Conversation

wborn
Copy link
Member

@wborn wborn commented Feb 8, 2022

This prevents the null analysis from inferring null values when printing to a Console.

Related to openhab/openhab-core#2742

…nsole

This prevents the null analysis from inferring null values when printing to a Console.

Related to openhab/openhab-core#2742

Signed-off-by: Wouter Born <[email protected]>
@wborn wborn requested a review from robnielsen as a code owner February 8, 2022 19:14
Copy link
Contributor

@robnielsen robnielsen left a comment

Choose a reason for hiding this comment

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

lgtm

@jlaur jlaur added the enhancement An enhancement or new feature for an existing add-on label Feb 8, 2022
Copy link
Contributor

@jlaur jlaur left a comment

Choose a reason for hiding this comment

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

Thanks!

@jlaur
Copy link
Contributor

jlaur commented Feb 8, 2022

@wborn - do I understand correctly that it's related to openhab/openhab-core#2742. but without any dependency, so ready for being merged?

@wborn
Copy link
Member Author

wborn commented Feb 8, 2022

Yes it can already be merged. It prevents a compilation issue when openhab/openhab-core#2742 is merged eventually. I just rewrote the code to help the null analysis with inferring that the printed values are never null. If you operate on the entrySet of a map you'll never run into non-existing keys.

@jlaur jlaur merged commit 14058c1 into openhab:main Feb 8, 2022
@jlaur jlaur added this to the 3.3 milestone Feb 8, 2022
@wborn wborn deleted the insteon-nullsafe-print branch February 8, 2022 20:32
NickWaterton pushed a commit to NickWaterton/openhab-addons that referenced this pull request Apr 27, 2022
…nsole (openhab#12243)

This prevents the null analysis from inferring null values when printing to a Console.

Related to openhab/openhab-core#2742

Signed-off-by: Wouter Born <[email protected]>
Signed-off-by: Nick Waterton <[email protected]>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Jun 29, 2022
…nsole (openhab#12243)

This prevents the null analysis from inferring null values when printing to a Console.

Related to openhab/openhab-core#2742

Signed-off-by: Wouter Born <[email protected]>
andan67 pushed a commit to andan67/openhab-addons that referenced this pull request Nov 6, 2022
…nsole (openhab#12243)

This prevents the null analysis from inferring null values when printing to a Console.

Related to openhab/openhab-core#2742

Signed-off-by: Wouter Born <[email protected]>
andrasU pushed a commit to andrasU/openhab-addons that referenced this pull request Nov 12, 2022
…nsole (openhab#12243)

This prevents the null analysis from inferring null values when printing to a Console.

Related to openhab/openhab-core#2742

Signed-off-by: Wouter Born <[email protected]>
Signed-off-by: Andras Uhrin <[email protected]>
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Feb 23, 2023
…nsole (openhab#12243)

This prevents the null analysis from inferring null values when printing to a Console.

Related to openhab/openhab-core#2742

Signed-off-by: Wouter Born <[email protected]>
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.

3 participants