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] Null annotations #7913

Closed
lolodomo opened this issue Jun 13, 2020 · 5 comments · Fixed by #8057
Closed

[netatmo] Null annotations #7913

lolodomo opened this issue Jun 13, 2020 · 5 comments · Fixed by #8057

Comments

@lolodomo
Copy link
Contributor

lolodomo commented Jun 13, 2020

@clinique @Novanic : for your information, I will add null annotations on all classes in the Netatmo binding.
We have many classes but it should not be too much difficult I think.
I am now just waiting for a merge to get again a compiling version of the binding in branch 2.5.x.

@Novanic
Copy link
Contributor

Novanic commented Jun 14, 2020

Ok, thank you. I think it's a good idea to refactor this one-time, that may be less work when done one-time and after that it is easier to make "correct" changes. ;-) There are about 30 classes within the binding, 6 are currently annotated with NonNullByDefault.

lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jun 25, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jun 25, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
cpmeister pushed a commit that referenced this issue Jun 25, 2020
Related to #7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jun 27, 2020
Related to openhab#7913

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

lolodomo commented Jun 27, 2020

To finish the job, I msut wait for the merge of #7968

wborn pushed a commit that referenced this issue Jun 28, 2020
Related to #7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 1, 2020
Fix openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 1, 2020
Fix openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 1, 2020
Fix openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 2, 2020
Fix openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 2, 2020
Fix openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 2, 2020
Fix openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 3, 2020
Fix openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 3, 2020
Fix openhab#7913

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

lolodomo commented Jul 3, 2020

https://github.com/openhab/openhab-addons/blob/2.5.x/bundles/org.openhab.binding.netatmo/src/main/java/org/openhab/binding/netatmo/internal/homecoach/NAHealthyHomeCoachHandler.java#L50

@clinique : is there a valid reason that for the homecoach you just get the first device while for the weather station for example you apply a filter on the id ? My feeling is that the filter on the id was to be sure to get a device in case the provided id was wrong.

lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 3, 2020
Fix openhab#7913

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

clinique commented Jul 3, 2020

@lolodomo : the homecoach part has not been developped by me so there may be possible enhancements I did not see

lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 3, 2020
Fix openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
lolodomo added a commit to lolodomo/openhab-addons that referenced this issue Jul 3, 2020
Fix openhab#7913

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

lolodomo commented Jul 3, 2020

OK, I fixed it in my PR.

Please note that I also suppressed the usage of Optional in class fields and method arguments after reading that it is not recommended (Optional only recommended as return of methods).

cpmeister pushed a commit that referenced this issue Jul 9, 2020
* [netatmo] Null annotations Part 3 of 3
Fix #7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix #8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this issue Jul 12, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this issue Jul 12, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
knikhilwiz pushed a commit to knikhilwiz/openhab2-addons that referenced this issue Jul 12, 2020
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this issue Jul 26, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: CSchlipp <christian@schlipp.de>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this issue Jul 26, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: CSchlipp <christian@schlipp.de>
CSchlipp pushed a commit to CSchlipp/openhab-addons that referenced this issue Jul 26, 2020
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: CSchlipp <christian@schlipp.de>
MPH80 pushed a commit to MPH80/openhab-addons that referenced this issue Aug 3, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: MPH80 <michael@hazelden.me>
MPH80 pushed a commit to MPH80/openhab-addons that referenced this issue Aug 3, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: MPH80 <michael@hazelden.me>
MPH80 pushed a commit to MPH80/openhab-addons that referenced this issue Aug 3, 2020
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: MPH80 <michael@hazelden.me>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
andrewfg pushed a commit to andrewfg/openhab-addons that referenced this issue Aug 31, 2020
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this issue Sep 1, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this issue Sep 1, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
DaanMeijer pushed a commit to DaanMeijer/openhab-addons that referenced this issue Sep 1, 2020
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Daan Meijer <daan@studioseptember.nl>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this issue Sep 19, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this issue Sep 19, 2020
Related to openhab#7913

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
markus7017 pushed a commit to markus7017/openhab-addons that referenced this issue Sep 19, 2020
* [netatmo] Null annotations Part 3 of 3
Fix openhab#7913
* Video status only set when there is a video in the event
* Add a setting to enable/disable the background discovery
Fix openhab#8083
* Cache Optional result in local variable

Signed-off-by: Laurent Garnier <lg.hc@free.fr>
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 a pull request may close this issue.

3 participants