mirror of
https://github.com/opennetworkinglab/onos.git
synced 2025-10-18 02:41:49 +02:00
ONOS-4975 Fixed potential for IOB exception in intent perf installer.
Change-Id: Ia0af1dbbad586a4c64883e20b80cb1ffbe251cd4
This commit is contained in:
parent
682c19e562
commit
3a02cdabf2
@ -425,7 +425,7 @@ public class IntentPerfInstaller {
|
|||||||
private Iterable<Intent> subset(Set<Intent> intents) {
|
private Iterable<Intent> subset(Set<Intent> intents) {
|
||||||
List<Intent> subset = Lists.newArrayList(intents);
|
List<Intent> subset = Lists.newArrayList(intents);
|
||||||
Collections.shuffle(subset);
|
Collections.shuffle(subset);
|
||||||
return subset.subList(0, lastCount);
|
return subset.subList(0, Math.min(intents.size(), lastCount));
|
||||||
}
|
}
|
||||||
|
|
||||||
// Submits the specified intent.
|
// Submits the specified intent.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user