catch SigarNotImplementedException
This commit is contained in:
parent
3945733a4b
commit
4ba686e79e
|
@ -1,6 +1,7 @@
|
|||
package net.hyperic.sigar.test;
|
||||
|
||||
import net.hyperic.sigar.Sigar;
|
||||
import net.hyperic.sigar.SigarNotImplementedException;
|
||||
import net.hyperic.sigar.SigarProxy;
|
||||
import net.hyperic.sigar.Cpu;
|
||||
|
||||
|
@ -29,11 +30,15 @@ public class TestCpu extends SigarTestCase {
|
|||
traceln("getCpu:");
|
||||
checkCpu(cpu);
|
||||
|
||||
try {
|
||||
Cpu[] cpuList = sigar.getCpuList();
|
||||
|
||||
for (int i=0; i<cpuList.length; i++) {
|
||||
traceln("Cpu " + i + ":");
|
||||
checkCpu(cpuList[i]);
|
||||
}
|
||||
} catch (SigarNotImplementedException e) {
|
||||
//ok
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue