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