diff options
author | 2015-10-19 10:14:31 -0700 | |
---|---|---|
committer | 2015-10-19 10:14:31 -0700 | |
commit | e9bb60be43af477f17b30ee1f2ba205565b7fa15 (patch) | |
tree | 981fd759a44b751fc45cde774f46fda37c11c257 /framework/src/onos/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java | |
parent | 74f3941756a1386cbc1fa99ee73fdc8376a0b6a0 (diff) |
Updated onos src tree to commit id 1e60f97ae50c05b94fcb6a10520738bfb5efdfd1
Diffstat (limited to 'framework/src/onos/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java')
-rw-r--r-- | framework/src/onos/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/framework/src/onos/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java b/framework/src/onos/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java index e35dc0c5..9215d3a0 100644 --- a/framework/src/onos/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java +++ b/framework/src/onos/core/net/src/main/java/org/onosproject/net/device/impl/DeviceManager.java @@ -18,6 +18,7 @@ package org.onosproject.net.device.impl; import static com.google.common.base.Preconditions.checkNotNull; import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; import static org.onlab.util.Tools.groupedThreads; +import static org.onlab.util.Tools.nullIsNotFound; import static org.onosproject.net.MastershipRole.MASTER; import static org.onosproject.net.MastershipRole.NONE; import static org.onosproject.net.MastershipRole.STANDBY; @@ -435,7 +436,7 @@ public class DeviceManager portDescription); return; } - final Device device = getDevice(deviceId); + Device device = nullIsNotFound(getDevice(deviceId), "Device not found"); if ((Device.Type.ROADM.equals(device.type()))) { Port port = getPort(deviceId, portDescription.portNumber()); portDescription = OpticalPortOperator.descriptionOf(port, portDescription.isEnabled()); |