(SIGAR-216) avoid ArrayIndexOutOfBoundsException in Sigar.getCpuPercList() when number of CPUs has decreased
This commit is contained in:
parent
4e0b8c02d0
commit
e43244a6e9
|
@ -373,7 +373,7 @@ public class Sigar implements SigarProxy {
|
|||
CpuPerc[] perc =
|
||||
new CpuPerc[curLen < oldLen ? curLen : oldLen];
|
||||
|
||||
for (int i=0; i<curLen; i++) {
|
||||
for (int i=0; i<perc.length; i++) {
|
||||
perc[i] =
|
||||
CpuPerc.fetch(this, oldCpuList[i],
|
||||
this.lastCpuList[i]);
|
||||
|
|
Loading…
Reference in New Issue