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

[netatmo] Make safe the execution of the refresh token job #8127

Merged
merged 2 commits into from
Jul 20, 2020

Conversation

lolodomo
Copy link
Contributor

Fix #4270

Signed-off-by: Laurent Garnier lg.hc@free.fr

Fix openhab#4270

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@TravisBuddy
Copy link

Travis tests were successful

Hey @lolodomo,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@@ -168,6 +168,10 @@ private void scheduleTokenInitAndRefresh() {
return;
}
}
} catch (Exception e) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Try to minimize the scope of the catch to just the runtime exceptions since any checked exceptions added in the future changes might unintentionally get handled the same.

Suggested change
} catch (Exception e) {
} catch (RuntimeException e) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After reading about RuntimeException vs Exception, I agree with you.

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
@TravisBuddy
Copy link

Travis tests were successful

Hey @lolodomo,
we found no major flaws with your code. Still you might want to look at this logfile, as we usually suggest some optional improvements.

@lolodomo
Copy link
Contributor Author

lolodomo commented Jul 18, 2020

@cpmeister @kaikreuzer @J-N-K @cweitkamp : is it possible please to have this PR merged before the release of 2.5.7 ?

@lolodomo
Copy link
Contributor Author

lolodomo commented Jul 19, 2020

Can this be merged quickly or is it now already too late for the release 2.5.7 ?

@J-N-K
Copy link
Member

J-N-K commented Jul 19, 2020

I‘ll make sure this is merged before 2.5.7. IMO the comment from @cpmeister is fully addressed but I would prefer to have his approval. 2.5.7 is expected next weekend.

@lolodomo
Copy link
Contributor Author

Ah ok, if we have still one week, I will stop pushing soo much ;)
This should give us the time to fix all bindings regarding thing actions.

@J-N-K J-N-K dismissed cpmeister’s stale review July 20, 2020 17:31

comments addressed

@J-N-K J-N-K merged commit 490509f into openhab:2.5.x Jul 20, 2020
@lolodomo lolodomo deleted the netatmo_refreshtokenjob branch July 20, 2020 17:36
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
)

Fixes openhab#4270

* [netatmo] Make safe the execution of the refresh token job

Signed-off-by: CSchlipp <christian@schlipp.de>
MPH80 pushed a commit to MPH80/openhab-addons that referenced this pull request Aug 3, 2020
)

Fixes openhab#4270

* [netatmo] Make safe the execution of the refresh token job

Signed-off-by: MPH80 <michael@hazelden.me>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
)

Fixes openhab#4270

* [netatmo] Make safe the execution of the refresh token job
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
)

Fixes openhab#4270

* [netatmo] Make safe the execution of the refresh token job
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
)

Fixes openhab#4270

* [netatmo] Make safe the execution of the refresh token job
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
)

Fixes openhab#4270

* [netatmo] Make safe the execution of the refresh token job
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
)

Fixes openhab#4270

* [netatmo] Make safe the execution of the refresh token job

Signed-off-by: Daan Meijer <daan@studioseptember.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
)

Fixes openhab#4270

* [netatmo] Make safe the execution of the refresh token job
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[netatmo] Binding does not reconnect after connection loss
5 participants