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

[orbitbhyve] Fix for NumberFormatException when parsing json object #14308

Merged

Conversation

mhilbush
Copy link
Contributor

Fixes #14307

The binding throws a NumberFormatException when parsing the Json object returned from the "devices" API endpoint. The field is defined as an int in the DTO, but the B-Hyve API can return either

“wifi_version”:0

or something like

“wifi_version”:“1.4.0”

The wifi_version is not used in the binding, nor do I see any reason why it might be used in the future. So from my perspective the easiest thing to do is to just delete it from the DTO.

I believe this should be a candidate to cherry-pick if there's another 3.4.x patch release.

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 Jan 31, 2023
@mhilbush mhilbush added this to the 4.0 milestone Jan 31, 2023
@mhilbush mhilbush requested a review from octa22 as a code owner January 31, 2023 19:18
@mhilbush mhilbush self-assigned this Jan 31, 2023
Copy link
Contributor

@lolodomo lolodomo left a comment

Choose a reason for hiding this comment

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

LGTM

@lolodomo lolodomo merged commit 09e8594 into openhab:main Jan 31, 2023
@lolodomo
Copy link
Contributor

lolodomo commented Feb 1, 2023

I believe this should be a candidate to cherry-pick if there's another 3.4.x patch release.

@jlaur ? ;)

@jlaur
Copy link
Contributor

jlaur commented Feb 1, 2023

I believe this should be a candidate to cherry-pick if there's another 3.4.x patch release.

@jlaur ? ;)

I agree. Will try to remember in the evening.

jlaur pushed a commit that referenced this pull request Feb 1, 2023
Signed-off-by: Mark Hilbush <mark@hilbush.com>
@jlaur jlaur added the patch A PR that has been cherry-picked to a patch release branch label Feb 1, 2023
@mhilbush mhilbush deleted the orbitbhyve-fix-numberformatexception branch February 1, 2023 17:53
psmedley pushed a commit to psmedley/openhab-addons that referenced this pull request Feb 23, 2023
Signed-off-by: Mark Hilbush <mark@hilbush.com>
nemerdaud pushed a commit to nemerdaud/openhab-addons that referenced this pull request Feb 28, 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 patch A PR that has been cherry-picked to a patch release branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[orbitbhyve] NumberFormatException when parsing "devices" json object
3 participants