cleanup based on eclipse warnings

This commit is contained in:
Doug MacEachern 2006-01-22 21:56:45 +00:00
parent 294c539f16
commit a4ccf9a36b
13 changed files with 1 additions and 36 deletions

View File

@ -16,8 +16,6 @@ public class FileInfo extends FileAttrs {
private boolean lstat;
private FileInfo oldInfo = null;
private static char DIFF_SEP = '|';
/**
* No file type determined.
*/

View File

@ -27,8 +27,6 @@ public abstract class FileTail extends FileWatcher {
}
public void onChange(FileInfo info) {
long len = info.size;
Reader reader = null;
String name = info.getName();

View File

@ -41,7 +41,6 @@ public class NetServices {
String line;
while ((line = reader.readLine()) != null) {
String name, protocol;
Long port;
line = line.trim();
if ((line.length() == 0) || (line.charAt(0) == '#')) {

View File

@ -203,7 +203,7 @@ public class SigarInvoker {
throws SigarException, SigarNotImplementedException {
Method typeGetter, attrGetter;
Object typeObject, attrObject;
Object typeObject;
typeGetter = getTypeMethod(args);
if (this.hasArrayIdx) {

View File

@ -12,7 +12,6 @@ public class SigarLog {
private static final int LOG_WARN = 2;
private static final int LOG_INFO = 3;
private static final int LOG_DEBUG = 4;
private static final int LOG_TRACE = 5;
private static native void setLogger(Sigar sigar, Logger log);

View File

@ -118,10 +118,6 @@ public class Iostat extends SigarCommandBase {
printf(items);
}
private static String formatSize(long size) {
return Sigar.formatSize(size * 1024);
}
public static void main(String[] args) throws Exception {
new Iostat().processCommand(args);
}

View File

@ -1,13 +1,10 @@
package net.hyperic.sigar.cmd;
import java.io.PrintStream;
import java.util.ArrayList;
import java.util.Map;
import java.lang.reflect.Method;
import net.hyperic.sigar.Sigar;
import net.hyperic.sigar.SigarException;
import net.hyperic.sigar.SigarProxy;
import net.hyperic.sigar.util.GetlineCompleter;
@ -30,10 +27,6 @@ public class PTQL
implements GetlineCompleter {
private Shell shell;
private PrintStream out = System.out;
private Sigar sigar;
private SigarProxy proxy;
private long[] foundPids = null;
private Ps ps;
private GetlineCompleter m_completer;
private Map methods;
@ -42,9 +35,6 @@ public class PTQL
public PTQL(Shell shell) {
this.shell = shell;
this.out = shell.getOutStream();
this.sigar = shell.getSigar();
this.proxy = shell.getSigarProxy();
this.ps = new Ps(this.shell);
this.methods = ProcessQueryBuilder.getMethods();
this.m_completer =

View File

@ -44,7 +44,6 @@ public class ProcInfo extends SigarCommandBase {
}
public void output(long pid) throws SigarException {
String state, mem, time, cred, credname;
println("pid=" + pid);
try {
println("state=" + sigar.getProcState(pid));

View File

@ -3,8 +3,6 @@ package net.hyperic.sigar.cmd;
import java.io.IOException;
import java.io.File;
import java.util.ArrayList;
import net.hyperic.sigar.Sigar;
import net.hyperic.sigar.SigarException;
import net.hyperic.sigar.SigarPermissionDeniedException;
@ -36,7 +34,6 @@ public class Shell extends ShellBase {
private Sigar sigar = new Sigar();
private SigarProxy proxy = SigarProxyCache.newInstance(this.sigar);
private long[] foundPids = new long[0];
private ArrayList completions = new ArrayList();
private boolean isInteractive = false;
public Shell() {

View File

@ -16,8 +16,6 @@ import net.hyperic.sigar.FileWatcherThread;
public class Tail {
public static void main(String[] args) throws SigarException {
final String pattern;
Sigar sigar = new Sigar();
FileWatcherThread watcherThread =

View File

@ -3,7 +3,6 @@ package net.hyperic.sigar.cmd;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Date;
import net.hyperic.sigar.Sigar;

View File

@ -585,7 +585,6 @@ public class ProcessQueryBuilder {
long val, double dval, int ival)
throws MalformedQueryException {
short opcode;
HashMap nops;
if ((type == Type.INT) ||
@ -633,7 +632,6 @@ public class ProcessQueryBuilder {
throws MalformedQueryException {
long longVal;
short opcode;
HashMap nops = LNUMOPS;
if (val.equals("$$")) {

View File

@ -231,8 +231,6 @@ public class Service extends Win32 {
public void stop(long timeout) throws Win32Exception
{
long status;
stop();
Waiter waiter =
@ -250,8 +248,6 @@ public class Service extends Win32 {
public void start(long timeout) throws Win32Exception
{
long status;
start();
Waiter waiter =
@ -269,8 +265,6 @@ public class Service extends Win32 {
public void pause(long timeout) throws Win32Exception
{
long status;
pause();
Waiter waiter =