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

[benqprojector] Fix NullPointerException when getting network interface name #14603

Merged
merged 1 commit into from
Mar 14, 2023

Conversation

mhilbush
Copy link
Contributor

While it occurs very rarely, it's possible for NetworkInterface.getByInetAddress to return null. This PR prevents the NPE in all bindings where this call is used.

Reported on forum here.

Signed-off-by: Mark Hilbush mark@hilbush.com

Signed-off-by: Mark Hilbush <mark@hilbush.com>
@mhilbush mhilbush added the bug An unexpected problem or unintended behavior of an add-on label Mar 14, 2023
@mhilbush mhilbush requested a review from mlobstein as a code owner March 14, 2023 14:30
Copy link
Contributor

@lsiepel lsiepel 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 changed the title [multiple bindings] Fix for NPE when getting network interface name Fix NullPointerException when getting network interface name Mar 14, 2023
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 - thanks.

Copy link
Contributor

@mlobstein mlobstein 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 d4b68b2 into openhab:main Mar 14, 2023
@jlaur jlaur added this to the 4.0 milestone Mar 14, 2023
@mhilbush mhilbush deleted the fix-potential-npe branch March 14, 2023 22:43
@wborn wborn changed the title Fix NullPointerException when getting network interface name [benqprojector] Fix NullPointerException when getting network interface name Mar 17, 2023
renescherer pushed a commit to renescherer/openhab-addons that referenced this pull request Mar 23, 2023
Signed-off-by: Mark Hilbush <mark@hilbush.com>
FordPrfkt pushed a commit to FordPrfkt/openhab-addons that referenced this pull request Apr 20, 2023
Signed-off-by: Mark Hilbush <mark@hilbush.com>
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.

4 participants