This repository has been archived by the owner on May 17, 2021. It is now read-only.
[souliss] Fixes NPE in souliss binding #5370
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
The NPE happens for all items that are not of souliss type. The fix is rather ugly, but it works.
9037568
reviewed
Nov 25, 2017
@@ -132,6 +132,10 @@ public void receiveCommand(String itemName, Command command) { | |||
|
|||
// Get the typical defined in the hash table | |||
SoulissGenericTypical T = SoulissGenericBindingProvider.SoulissTypicalsRecipients.getTypicalFromItem(itemName); | |||
if (T == null) { | |||
logger.debug("SoulissTypical not found for item: " + itemName); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use parameterized logging instead of string concatenation.
9037568
suggested changes
Nov 25, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this fix.
9037568
approved these changes
Nov 25, 2017
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
This pull request has been mentioned on openHAB Community. There might be relevant details there: https://community.openhab.org/t/issue-with-souliss-binding-after-update/20246/6 |
Nice, thanks! |
9037568
changed the title
Fixes NPE in souliss binding
[souliss] Fixes NPE in souliss binding
Dec 17, 2017
I have the same problem too. Does jar addon available with this bugfix? |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The NPE happens for all items that are not of souliss type. The fix is rather ugly, but it works.
There are at least three articles in the community site referencing this problem:
Fixes #5369.