commit | f468858e9104e49e83c6294fdc4d17ce9456d7fd | [log] [tgz] |
---|---|---|
author | Andrea Campanella <andrea@opennetworking.org> | Thu Nov 28 14:31:02 2019 +0100 |
committer | Andrea Campanella <andrea@opennetworking.org> | Thu Nov 28 14:31:02 2019 +0100 |
tree | c40bee41d387fdeea469a281576c60e8010200e4 | |
parent | 5e8b2bc52f7c2067e29c0d322ccdd75ed06790c5 [diff] |
Avoid propagating a null chassisID Change-Id: I028008e45d1c78d149ef654047b9c1572eb05476
diff --git a/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java b/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java index eb5f16a..d0b7b2b 100644 --- a/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java +++ b/core/api/src/main/java/org/onosproject/net/device/DefaultDeviceDescription.java
@@ -110,6 +110,10 @@ this.hwVersion = hwVersion; this.swVersion = swVersion; this.serialNumber = serialNumber; + //Avoid propagation of null chassisID and substitute it with UNKNOWN + if (chassis == null) { + chassis = new ChassisId(); + } this.chassisId = chassis; this.defaultAvailable = defaultAvailable; }