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

[shelly] Fix NullPointerException #18103

Merged
merged 2 commits into from
Jan 13, 2025

Conversation

tl-photography
Copy link
Contributor

This PR intends to fix #18065.

The mode seems to be null under certain conditions. Since this bug is actually located in a special handling for one specific device this quick fix was taken.

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 for the fix!

I'm struggling to understand the complexities of this binding, and I tried to investigate it a bit further based on the stack trace provided in the linked issue. But the questions and further needed investigations quickly accumulated, so I fully agree keep this scope and do this limited fix for the special case device.

@jlaur jlaur changed the title [Shelly] change order of check to prevent NPE [shelly] Fix NullPointerException Jan 13, 2025
@tl-photography
Copy link
Contributor Author

Thanks for the fix!

I'm struggling to understand the complexities of this binding, and I tried to investigate it a bit further based on the stack trace provided in the linked issue. But the questions and further needed investigations quickly accumulated, so I fully agree keep this scope and do this limited fix for the special case device.

I had the same issue and I actually thought this would be actually a valid case that this is null, but may @markus7017 knows better.

Co-authored-by: Jacob Laursen <[email protected]>
Signed-off-by: tl-photography <[email protected]>
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.

LGTM

@jlaur jlaur merged commit d8618a7 into openhab:main Jan 13, 2025
2 checks passed
@jlaur jlaur added the bug An unexpected problem or unintended behavior of an add-on label Jan 13, 2025
jlaur pushed a commit that referenced this pull request Jan 13, 2025
@jlaur jlaur added the patch A PR that has been cherry-picked to a patch release branch label Jan 13, 2025
@tl-photography tl-photography deleted the bugfix/shelly-manager branch January 14, 2025 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An unexpected problem or unintended behavior of an add-on patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[shelly] Shelly Manager throws NullPointerException
2 participants