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

[avmfritz] Avoid a hidden NPE when getIdentifier() of an uninitialized ThingHandler is called #9040

Merged
merged 3 commits into from
Nov 16, 2020

Conversation

cweitkamp
Copy link
Contributor

  • Avoid a hidden NPE when getIdentifier() of an uninitialized ThingHandler is called

Signed-off-by: Christoph Weitkamp [email protected]

@cweitkamp cweitkamp added the bug An unexpected problem or unintended behavior of an add-on label Nov 15, 2020
@cweitkamp
Copy link
Contributor Author

Can be backported to OH 2.5.x, if possible.

Signed-off-by: Christoph Weitkamp <[email protected]>
Copy link

@Bushido76 Bushido76 left a comment

Choose a reason for hiding this comment

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

The hidden NPE was initially traced down and reported by me as it lead to various instabilities in Thing handling. The correction was discussed with Christoph and applied by him. The binding - with all corrections applied - is running on my local OH3 instance since yesterday noon and the binding is behaving much more reliably since.

@kaikreuzer kaikreuzer merged commit 896640d into openhab:main Nov 16, 2020
@kaikreuzer kaikreuzer added this to the 3.0.0.M3 milestone Nov 16, 2020
@cweitkamp cweitkamp deleted the bugfix-hidden-npe branch November 16, 2020 17:09
@kaikreuzer
Copy link
Member

Can be backported to OH 2.5.x, if possible.

I'm afraid cherry-picking results in a merge conflict in the imports of the Powerline handler class.
You'll have to do it locally, resolve the conflict and create a dedicated PR for that, sorry.

@cweitkamp
Copy link
Contributor Author

Okay, see #9043.

boehan pushed a commit to boehan/openhab-addons that referenced this pull request Apr 12, 2021
…d ThingHandler is called (openhab#9040)

* Avoid a hidden NPE when getIdentifier() of an uninitialized ThingHandler is called
* Fixed Powerline546EHandler

Signed-off-by: Christoph Weitkamp <[email protected]>
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
…d ThingHandler is called (openhab#9040)

* Avoid a hidden NPE when getIdentifier() of an uninitialized ThingHandler is called
* Fixed Powerline546EHandler

Signed-off-by: Christoph Weitkamp <[email protected]>
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants