use new Sigar for getFQDN
This commit is contained in:
parent
aa28742fdd
commit
0dfdef864c
|
@ -35,10 +35,13 @@ public class Version extends SigarCommandBase {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String getFQDN() {
|
private static String getFQDN() {
|
||||||
|
Sigar sigar = new Sigar();
|
||||||
try {
|
try {
|
||||||
return Sigar.getInstance().getFQDN();
|
return sigar.getFQDN();
|
||||||
} catch (SigarException e) {
|
} catch (SigarException e) {
|
||||||
return "unknown";
|
return "unknown";
|
||||||
|
} finally {
|
||||||
|
sigar.close();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue