-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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] Consider TimeZoneProvider #7894
Conversation
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Travis tests were successfulHey @lolodomo, |
@@ -39,13 +40,20 @@ | |||
@NonNullByDefault | |||
public class ChannelTypeUtils { | |||
|
|||
private static @Nullable TimeZoneProvider timeZoneProvider; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I'm comfortable with adding static variables if you don't have to. But I can see why you would want to.
@J-N-K What is your opinion on this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I can avoid it but I should then pass TimeZoneProvier as parameter to a lot of handler classes.
If you prefer, I can do it.
Note that the astro binding uses this way with the global variable.
Travis tests were successfulHey @lolodomo, |
Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Travis tests were successfulHey @lolodomo, |
As you can see, to avoid the global variable, it required many more changes. Note that I have not tested the changes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Yeah, sorry about having you go through that. Static fields can make some things so much more convenient but they can also cause unforeseen problems in what should be a modular environment. Thank you. |
* [netatmo] Consider TimeZoneProvider * Add a @nullable * Avoid storing timeZoneProvider in a static variable Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [netatmo] Consider TimeZoneProvider * Add a @nullable * Avoid storing timeZoneProvider in a static variable Signed-off-by: Laurent Garnier <lg.hc@free.fr> Signed-off-by: CSchlipp <christian@schlipp.de>
* [netatmo] Consider TimeZoneProvider * Add a @nullable * Avoid storing timeZoneProvider in a static variable Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [netatmo] Consider TimeZoneProvider * Add a @nullable * Avoid storing timeZoneProvider in a static variable Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [netatmo] Consider TimeZoneProvider * Add a @nullable * Avoid storing timeZoneProvider in a static variable Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [netatmo] Consider TimeZoneProvider * Add a @nullable * Avoid storing timeZoneProvider in a static variable Signed-off-by: Laurent Garnier <lg.hc@free.fr>
* [netatmo] Consider TimeZoneProvider * Add a @nullable * Avoid storing timeZoneProvider in a static variable Signed-off-by: Laurent Garnier <lg.hc@free.fr> Signed-off-by: Daan Meijer <daan@studioseptember.nl>
* [netatmo] Consider TimeZoneProvider * Add a @nullable * Avoid storing timeZoneProvider in a static variable Signed-off-by: Laurent Garnier <lg.hc@free.fr>
Signed-off-by: Laurent Garnier lg.hc@free.fr