* [hue] extra null check Signed-off-by: Andrew Fiddian-Green <software@whitebear.ch>pull/10202/head
parent
1c5f0d1797
commit
a9f440dba2
|
@ -119,9 +119,11 @@ public class HueBridgeDiscoveryParticipant implements UpnpDiscoveryParticipant {
|
|||
try {
|
||||
Configuration conf = configAdmin.getConfiguration("binding.hue");
|
||||
Dictionary<String, @Nullable Object> properties = conf.getProperties();
|
||||
Object property = properties.get(HueBindingConstants.REMOVAL_GRACE_PERIOD);
|
||||
if (property != null) {
|
||||
removalGracePeriodSeconds = Long.parseLong(property.toString());
|
||||
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…
Reference in New Issue