rid eclipse warnings

This commit is contained in:
Doug MacEachern 2006-03-04 03:17:05 +00:00
parent e63e0ff456
commit c13a918e32
9 changed files with 12 additions and 23 deletions

View File

@ -586,7 +586,6 @@ public abstract class ShellBase
throws PageFetchException
{
PrintStream out;
PageControl curPage;
PageList data;
boolean lineNumberMode;

View File

@ -228,7 +228,6 @@ public class Proxy {
String type = method.getName().substring(3);
Class attrClass = method.getReturnType();
Class[] paramTypes;
if (isNonStringArg(method)) {
continue;
@ -406,6 +405,7 @@ public class Proxy {
} catch (SigarException e) {
String msg =
type + " failed: " + e.getMessage();
System.err.println(msg);
return null;
}
}
@ -426,11 +426,7 @@ public class Proxy {
output("ourPid=" + ourPid);
if (args.length >= 2) {
String type = args[0], arg = null, attr = args[args.length - 1];
if (args.length == 3) {
arg = args[1];
}
String type = args[0], attr = args[args.length - 1];
if (type.equals("leaktest")) {
int num = Integer.parseInt(args[1]);
@ -448,6 +444,8 @@ public class Proxy {
throw new SigarException(e.getMessage());
} catch (InvocationTargetException e) {
throw new SigarException(e.getMessage());
} finally {
s.close();
}
}

View File

@ -62,7 +62,7 @@ public class RunThreadCpu {
for (int i=0; i<iter; i++) {
s += System.getProperty("java.home");
for (int j=0; j<s.length(); j++) {
char c = s.charAt(j);
s.charAt(j);
}
}
printTimes(start);

View File

@ -69,14 +69,14 @@ public class TestFileInfo extends SigarTestCase {
}
else {
try {
DirStat stats = sigar.getDirStat(file);
sigar.getDirStat(file);
assertTrue(false);
} catch (SigarException e) {
assertTrue(true);
}
}
FileInfo link = sigar.getLinkInfo(file);
sigar.getLinkInfo(file);
}
public void testCreate() throws Exception {

View File

@ -82,7 +82,7 @@ public class TestInvoker extends SigarTestCase {
SigarInvokerJMX invoker =
SigarInvokerJMX.getInstance(proxy, query[0]);
try {
Object o = invoker.invoke(query[1]);
invoker.invoke(query[1]);
assertTrue(false);
} catch (SigarException e) {
traceln(query[0] + ":" + query[1] + "=" + e.getMessage());

View File

@ -52,8 +52,7 @@ public class TestNetIf extends SigarTestCase {
//test bogus arg results in exception (and not a segfault)
try {
traceln("testing bogus getNetInterfaceStat");
NetInterfaceStat ifstat =
sigar.getNetInterfaceStat("were switching to night vision");
sigar.getNetInterfaceStat("were switching to night vision");
fail("switched to night vision");
} catch (SigarException e) {
//expected
@ -62,8 +61,7 @@ public class TestNetIf extends SigarTestCase {
//test bogus arg results in exception (and not a segfault)
try {
traceln("testing bogus getNetInterfaceConfig");
NetInterfaceConfig ifconfig =
sigar.getNetInterfaceConfig("happy meal");
sigar.getNetInterfaceConfig("happy meal");
fail("unexpected treat in happy meal");
} catch (SigarException e) {
//expected

View File

@ -24,10 +24,9 @@ public class TestProcExe extends SigarTestCase {
//assertTrue(new File(cwd).isDirectory());
File exeFile = new File(exe.getName());
traceln("exe='" + exe.getName() + "'");
//assertTrue(exeFile.exists());
//assertTrue(new File(exeFile).exists());
} catch (SigarNotImplementedException e) {
//ok
}

View File

@ -27,8 +27,6 @@ public class TestThreads extends TestCase {
boolean useGlobal = false;
public void run() {
int expire = 1000;
Sigar sigar;
SigarProxy proxy;

View File

@ -2,7 +2,6 @@ package net.hyperic.sigar.win32.test;
import net.hyperic.sigar.test.SigarTestCase;
import net.hyperic.sigar.win32.Pdh;
import net.hyperic.sigar.win32.Win32Exception;
public class TestPdh extends SigarTestCase {
@ -39,9 +38,7 @@ public class TestPdh extends SigarTestCase {
*/
}
public void testPdh () throws Exception {
Pdh pdh = new Pdh();
public void testPdh() throws Exception {
String[] iface = Pdh.getKeys("Thread");