Skip to content

Commit

Permalink
(SIGAR-216) avoid ArrayIndexOutOfBoundsException in Sigar.getCpuPercL…
Browse files Browse the repository at this point in the history
…ist() when number of CPUs has decreased
  • Loading branch information
ispringer authored and dougm committed May 13, 2010
1 parent 4e0b8c0 commit e43244a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bindings/java/src/org/hyperic/sigar/Sigar.java
Expand Up @@ -373,7 +373,7 @@ public CpuPerc[] getCpuPercList() throws SigarException {
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]);
Expand Down

0 comments on commit e43244a

Please sign in to comment.