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

[astro] Discovery service with constructor injection #7850

Merged
merged 2 commits into from
Jun 10, 2020

Conversation

lolodomo
Copy link
Contributor

@lolodomo lolodomo commented Jun 3, 2020

Null annotations added.

Signed-off-by: Laurent Garnier [email protected]

Null annotations added.

Signed-off-by: Laurent Garnier <[email protected]>
@lolodomo lolodomo requested a review from gerrieg as a code owner June 3, 2020 19:13
@clinique
Copy link
Contributor

clinique commented Jun 9, 2020

I will update accordingly once the first PR is merged

Comment on lines 64 to 68
final @Reference LocaleProvider localeProvider, final @Reference TranslationProvider i18nProvider) {
super(new HashSet<>(Arrays.asList(new ThingTypeUID(BINDING_ID, "-"))), DISCOVER_TIMEOUT_SECONDS, true);
this.locationProvider = locationProvider;
this.localeProvider = localeProvider;
this.i18nProvider = i18nProvider;
Copy link
Contributor

Choose a reason for hiding this comment

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

You need to call activate otherwise background discovery will not start.

Suggested change
final @Reference LocaleProvider localeProvider, final @Reference TranslationProvider i18nProvider) {
super(new HashSet<>(Arrays.asList(new ThingTypeUID(BINDING_ID, "-"))), DISCOVER_TIMEOUT_SECONDS, true);
this.locationProvider = locationProvider;
this.localeProvider = localeProvider;
this.i18nProvider = i18nProvider;
final @Reference LocaleProvider localeProvider, final @Reference TranslationProvider i18nProvider,
Map<String, Object> configProperties) {
super(new HashSet<>(Arrays.asList(new ThingTypeUID(BINDING_ID, "-"))), DISCOVER_TIMEOUT_SECONDS, true);
this.locationProvider = locationProvider;
this.localeProvider = localeProvider;
this.i18nProvider = i18nProvider;
activate(configProperties);

Signed-off-by: Laurent Garnier <[email protected]>
@TravisBuddy
Copy link

Travis tests have failed

Hey @lolodomo,
please read the following log in order to understand the failure reason. There might also be some helpful tips along the way.
It will be awesome if you fix what is wrong and commit the changes.

Copy link
Contributor

@cpmeister cpmeister left a comment

Choose a reason for hiding this comment

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

LGTM

@cpmeister cpmeister merged commit d2000e5 into openhab:2.5.x Jun 10, 2020
@cpmeister cpmeister added this to the 2.5.6 milestone Jun 10, 2020
@lolodomo lolodomo deleted the astro_discovery_injection branch June 10, 2020 17:03
knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this pull request Jul 12, 2020
* [astro] Discovery service with constructor injection

Null annotations added.
* Call activate in the constructor

Signed-off-by: Laurent Garnier <[email protected]>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this pull request Jul 26, 2020
* [astro] Discovery service with constructor injection

Null annotations added.
* Call activate in the constructor

Signed-off-by: Laurent Garnier <[email protected]>
Signed-off-by: CSchlipp <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* [astro] Discovery service with constructor injection

Null annotations added.
* Call activate in the constructor

Signed-off-by: Laurent Garnier <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* [astro] Discovery service with constructor injection

Null annotations added.
* Call activate in the constructor

Signed-off-by: Laurent Garnier <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* [astro] Discovery service with constructor injection

Null annotations added.
* Call activate in the constructor

Signed-off-by: Laurent Garnier <[email protected]>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this pull request Aug 31, 2020
* [astro] Discovery service with constructor injection

Null annotations added.
* Call activate in the constructor

Signed-off-by: Laurent Garnier <[email protected]>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this pull request Sep 1, 2020
* [astro] Discovery service with constructor injection

Null annotations added.
* Call activate in the constructor

Signed-off-by: Laurent Garnier <[email protected]>
Signed-off-by: Daan Meijer <[email protected]>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this pull request Sep 19, 2020
* [astro] Discovery service with constructor injection

Null annotations added.
* Call activate in the constructor

Signed-off-by: Laurent Garnier <[email protected]>
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.

4 participants