commit | 8e78f465f8f0235b521568b4532f4ffc75a417bd | [log] [tgz] |
---|---|---|
author | Ray Milkey <ray@onlab.us> | Fri Jan 20 13:07:47 2017 -0800 |
committer | Ray Milkey <ray@onlab.us> | Fri Jan 20 22:53:17 2017 +0000 |
tree | 712238246e8571576dca7f7ba4bd8c1822ddb831 | |
parent | 8eac4ae4dabdc96898379c82dc7a92b8d4272778 [diff] |
Fix NPE when a driver has no parents Change-Id: I15161fdcc89c5f36600fc6df225d42a373724507
diff --git a/cli/src/main/java/org/onosproject/cli/net/DriversListCommand.java b/cli/src/main/java/org/onosproject/cli/net/DriversListCommand.java index 3ae2b8e..2b884bc 100644 --- a/cli/src/main/java/org/onosproject/cli/net/DriversListCommand.java +++ b/cli/src/main/java/org/onosproject/cli/net/DriversListCommand.java
@@ -68,7 +68,7 @@ private void printDriver(Driver driver) { if (outputJson()) { json(driver); - } else { + } else if (driver.parents() != null) { driver.parents().forEach(parent -> { print(FMT, driver.name(), parent != null ? parent.name() : "none", driver.manufacturer(), driver.hwVersion(), driver.swVersion());