Skip to content
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 2 commits into from Dec 1, 2017
Merged

[souliss] Fixes NPE in souliss binding #5370

merged 2 commits into from Dec 1, 2017

Conversation

rymdbullen
Copy link
Contributor

@rymdbullen rymdbullen commented Nov 25, 2017

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.

The NPE happens for all items that are not of souliss type. The fix is rather ugly, but it works.
@@ -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);
Copy link
Contributor

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.

Copy link
Contributor

@9037568 9037568 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 this fix.

Copy link
Contributor

@9037568 9037568 left a comment

Choose a reason for hiding this comment

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

LGTM.

@9037568 9037568 added this to the 1.11.0 milestone Nov 25, 2017
@openhab-bot
Copy link
Collaborator

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

@kaikreuzer
Copy link
Member

Nice, thanks!

@kaikreuzer kaikreuzer merged commit b9f4473 into openhab:master Dec 1, 2017
@9037568 9037568 changed the title Fixes NPE in souliss binding [souliss] Fixes NPE in souliss binding Dec 17, 2017
@pistoletov1974
Copy link

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.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[souliss] NullPointerException in receiveCommand
5 participants