* [hue] extra null check Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>
This commit is contained in:
parent
1c5f0d1797
commit
a9f440dba2
@ -119,10 +119,12 @@ public class HueBridgeDiscoveryParticipant implements UpnpDiscoveryParticipant {
|
||||
try {
|
||||
Configuration conf = configAdmin.getConfiguration("binding.hue");
|
||||
Dictionary<String, @Nullable Object> properties = conf.getProperties();
|
||||
if (properties != null) {
|
||||
Object property = properties.get(HueBindingConstants.REMOVAL_GRACE_PERIOD);
|
||||
if (property != null) {
|
||||
removalGracePeriodSeconds = Long.parseLong(property.toString());
|
||||
}
|
||||
}
|
||||
} catch (IOException | IllegalStateException | NumberFormatException e) {
|
||||
// fall through to pre-initialised (default) value
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user