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

[icalendar] Ensure Bridge is initialized and calendar is available to update child Things #9337

Merged
merged 2 commits into from Dec 13, 2020

Conversation

cweitkamp
Copy link
Contributor

  • Ensure Bridge is initialized and calendar is available to update child Things

Related to #9029 and #9230

Signed-off-by: Christoph Weitkamp github@christophweitkamp.de

…d Things

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
@cweitkamp cweitkamp added the bug An unexpected problem or unintended behavior of an add-on label Dec 12, 2020
Copy link
Contributor

@daMihe daMihe left a comment

Choose a reason for hiding this comment

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

Wow. This is much cleaner. I have to learn quite much about the framework as i did not know about this possibility.

This also handles the race condition between Thing and Bridge by nearly just using the framework. Nice work!

Comment on lines 396 to 398
for (Thing childThing : getThing().getThings()) {
updateChild(childThing.getHandler());
}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
for (Thing childThing : getThing().getThings()) {
updateChild(childThing.getHandler());
}
getThing().getThings().forEach(childThing -> updateChild(childThing.getHandler());

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I expected this comment ... Why didn't I implemented it in this way directly. 😉

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
@J-N-K J-N-K merged commit 863606e into openhab:main Dec 13, 2020
@J-N-K J-N-K added this to the 3.0.0.RC1 milestone Dec 13, 2020
@cweitkamp cweitkamp deleted the bugfix-9029-icalendar-race-condition branch December 13, 2020 08:09
nowaterman pushed a commit to nowaterman/openhab-addons that referenced this pull request Jan 19, 2021
… update child Things (openhab#9337)

* Ensure Bridge is initialized and calendar is available to update child Things
marcfischerboschio pushed a commit to bosch-io/openhab-addons that referenced this pull request May 5, 2022
… update child Things (openhab#9337)

* Ensure Bridge is initialized and calendar is available to update child Things

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
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.

None yet

3 participants