Skip to content

Commit 2d20f33

Browse files
Niraj DubeyCharles Chan
authored andcommitted
Fix: Add proper check to avoid IndexOutOfBoundsException.
Change-Id: I50e2eedd53dcc81aa51a8ce6dd5dcf13ab967652
1 parent 6db2a1f commit 2d20f33

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/ovsdb/src/main/java/org/onosproject/drivers/ovsdb/OvsdbQosConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ public void deleteQueues(QosId qosId, List<Long> queueKeys) {
136136
// is used in the core. So DeviceId need be changed to OvsdbNodeId.
137137
private OvsdbNodeId changeDeviceIdToNodeId(DeviceId deviceId) {
138138
String[] splits = deviceId.toString().split(":");
139-
if (splits.length < 1) {
139+
if (splits.length < 2) {
140140
return null;
141141
}
142142
IpAddress ipAddress = IpAddress.valueOf(splits[1]);

0 commit comments

Comments
 (0)