use super class getProperty

This commit is contained in:
Doug MacEachern 2004-07-06 04:18:02 +00:00
parent 025f551291
commit f56e1c0744
1 changed files with 1 additions and 17 deletions

View File

@ -1,10 +1,5 @@
package net.hyperic.sigar.test; package net.hyperic.sigar.test;
import java.io.IOException;
import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;
import net.hyperic.sigar.Sigar; import net.hyperic.sigar.Sigar;
public class TestFQDN extends SigarTestCase { public class TestFQDN extends SigarTestCase {
@ -14,17 +9,6 @@ public class TestFQDN extends SigarTestCase {
} }
public void testCreate() throws Exception { public void testCreate() throws Exception {
Properties props = new Properties();
File f = new File(System.getProperty("user.home"),
".sigar.properties");
if (f.exists()) {
try {
props.load(new FileInputStream(f));
} catch (IOException e) {
e.printStackTrace();
}
}
String fqdn = getSigar().getFQDN(); String fqdn = getSigar().getFQDN();
@ -34,7 +18,7 @@ public class TestFQDN extends SigarTestCase {
if (!validFQDN) { if (!validFQDN) {
//wont get a valid fqdn on laptop at home //wont get a valid fqdn on laptop at home
//allow to fake with ant -Dsigar.fqdn=foo.bar //allow to fake with ant -Dsigar.fqdn=foo.bar
String pfake = props.getProperty("sigar.fqdn"); String pfake = getProperty("sigar.fqdn");
String fake = String fake =
System.getProperty("sigar.fqdn", pfake); System.getProperty("sigar.fqdn", pfake);
if ("".equals(fake)) { if ("".equals(fake)) {