From 0dfdef864c6a0bd0412cd5805bddf4b232eb9d9e Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Wed, 9 Nov 2005 18:05:16 +0000 Subject: [PATCH] use new Sigar for getFQDN --- bindings/java/src/net/hyperic/sigar/cmd/Version.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bindings/java/src/net/hyperic/sigar/cmd/Version.java b/bindings/java/src/net/hyperic/sigar/cmd/Version.java index 67485499..ae1d452f 100644 --- a/bindings/java/src/net/hyperic/sigar/cmd/Version.java +++ b/bindings/java/src/net/hyperic/sigar/cmd/Version.java @@ -35,10 +35,13 @@ public class Version extends SigarCommandBase { } private static String getFQDN() { + Sigar sigar = new Sigar(); try { - return Sigar.getInstance().getFQDN(); + return sigar.getFQDN(); } catch (SigarException e) { return "unknown"; + } finally { + sigar.close(); } }