make sigar instance static for getSigar()
This commit is contained in:
parent
4e27c142d0
commit
c6dd77749b
@ -14,7 +14,7 @@ import net.hyperic.sigar.Sigar;
|
|||||||
//helper to add optional tracing.
|
//helper to add optional tracing.
|
||||||
public abstract class SigarTestCase extends TestCase {
|
public abstract class SigarTestCase extends TestCase {
|
||||||
|
|
||||||
private Sigar sigar = null;
|
private static Sigar sigar = null;
|
||||||
private Properties props = new Properties();
|
private Properties props = new Properties();
|
||||||
|
|
||||||
private static boolean verbose = false;
|
private static boolean verbose = false;
|
||||||
@ -43,13 +43,13 @@ public abstract class SigarTestCase extends TestCase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public Sigar getSigar() {
|
public Sigar getSigar() {
|
||||||
if (this.sigar == null) {
|
if (sigar == null) {
|
||||||
this.sigar = new Sigar();
|
sigar = new Sigar();
|
||||||
if (getVerbose()) {
|
if (getVerbose()) {
|
||||||
this.sigar.enableLogging(true);
|
sigar.enableLogging(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return this.sigar;
|
return sigar;
|
||||||
}
|
}
|
||||||
|
|
||||||
public Properties getProperties() {
|
public Properties getProperties() {
|
||||||
|
Loading…
Reference in New Issue
Block a user