commit | 2d20f33dca66938e085fef3f1829fe6945523ae6 | [log] [tgz] |
---|---|---|
author | Niraj Dubey <niraj.d@samsung.com> | Thu Sep 26 13:48:39 2019 +0530 |
committer | Charles Chan <charles@opennetworking.org> | Fri Sep 27 19:41:40 2019 +0000 |
tree | ec9e6b796673eefdcafa84e9364c140aeddd7155 | |
parent | 6db2a1fcf99129dbf355756d51f6f8ae84c02273 [diff] |
Fix: Add proper check to avoid IndexOutOfBoundsException. Change-Id: I50e2eedd53dcc81aa51a8ce6dd5dcf13ab967652
diff --git a/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbQosConfig.java b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbQosConfig.java index 27f6954..0e9b18a 100644 --- a/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbQosConfig.java +++ b/drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbQosConfig.java
@@ -136,7 +136,7 @@ // is used in the core. So DeviceId need be changed to OvsdbNodeId. private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) { String[] splits = deviceId.toString().split(":"); - if (splits.length < 1) { + if (splits.length < 2) { return null; } IpAddress ipAddress = IpAddress.valueOf(splits[1]);