Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Small fix to avoid NullPointerException #2482

Merged
merged 1 commit into from Apr 20, 2015
Merged

Conversation

marcelrv
Copy link
Contributor

as .equals(null) is not a correct check
Signed-off-by: Marcel Verpaalen marcel@verpaalen.com

@buildhive
Copy link

openhab » openhab #2811 SUCCESS
This pull request looks good
(what's this?)

@@ -334,7 +334,7 @@ public void internalReceiveCommand(String itemName, Command command) {
for (MaxCubeBindingProvider provider : providers) {
serialNumber = provider.getSerialNumber(itemName);

if (serialNumber.equals(null)) {
if (serialNumber==null || serialNumber.isEmpty()) {
Copy link
Member

Choose a reason for hiding this comment

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

please use StringUtils.isBlank() instead

@teichsta
Copy link
Member

Hi @marcelrv thanks for this Fix. Please find my comment and finally please squash your commits into one. Thanks, Thomas E.-E.

@marcelrv
Copy link
Contributor Author

Hi @teichsta ,
Got it.

@buildhive
Copy link

openhab » openhab #2814 SUCCESS
This pull request looks good
(what's this?)

@teichsta
Copy link
Member

Got it.

not quite :-) isBlank() already contains the "null check" …

Signed-off-by: Marcel Verpaalen <marcel@verpaalen.com>
@marcelrv
Copy link
Contributor Author

ah.. did not know that :-(
Okay.. hope that now I got it :-)

teichsta added a commit that referenced this pull request Apr 20, 2015
Small fix to avoid NullPointerException
@teichsta teichsta merged commit dd42c58 into openhab:master Apr 20, 2015
@teichsta
Copy link
Member

yep, thanks!

@buildhive
Copy link

openhab » openhab #2816 SUCCESS
This pull request looks good
(what's this?)

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.

None yet

3 participants