cleanup based on eclipse warnings
This commit is contained in:
parent
294c539f16
commit
a4ccf9a36b
@ -16,8 +16,6 @@ public class FileInfo extends FileAttrs {
|
|||||||
private boolean lstat;
|
private boolean lstat;
|
||||||
private FileInfo oldInfo = null;
|
private FileInfo oldInfo = null;
|
||||||
|
|
||||||
private static char DIFF_SEP = '|';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No file type determined.
|
* No file type determined.
|
||||||
*/
|
*/
|
||||||
|
@ -27,8 +27,6 @@ public abstract class FileTail extends FileWatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void onChange(FileInfo info) {
|
public void onChange(FileInfo info) {
|
||||||
long len = info.size;
|
|
||||||
|
|
||||||
Reader reader = null;
|
Reader reader = null;
|
||||||
String name = info.getName();
|
String name = info.getName();
|
||||||
|
|
||||||
|
@ -41,7 +41,6 @@ public class NetServices {
|
|||||||
String line;
|
String line;
|
||||||
while ((line = reader.readLine()) != null) {
|
while ((line = reader.readLine()) != null) {
|
||||||
String name, protocol;
|
String name, protocol;
|
||||||
Long port;
|
|
||||||
|
|
||||||
line = line.trim();
|
line = line.trim();
|
||||||
if ((line.length() == 0) || (line.charAt(0) == '#')) {
|
if ((line.length() == 0) || (line.charAt(0) == '#')) {
|
||||||
|
@ -203,7 +203,7 @@ public class SigarInvoker {
|
|||||||
throws SigarException, SigarNotImplementedException {
|
throws SigarException, SigarNotImplementedException {
|
||||||
|
|
||||||
Method typeGetter, attrGetter;
|
Method typeGetter, attrGetter;
|
||||||
Object typeObject, attrObject;
|
Object typeObject;
|
||||||
|
|
||||||
typeGetter = getTypeMethod(args);
|
typeGetter = getTypeMethod(args);
|
||||||
if (this.hasArrayIdx) {
|
if (this.hasArrayIdx) {
|
||||||
|
@ -12,7 +12,6 @@ public class SigarLog {
|
|||||||
private static final int LOG_WARN = 2;
|
private static final int LOG_WARN = 2;
|
||||||
private static final int LOG_INFO = 3;
|
private static final int LOG_INFO = 3;
|
||||||
private static final int LOG_DEBUG = 4;
|
private static final int LOG_DEBUG = 4;
|
||||||
private static final int LOG_TRACE = 5;
|
|
||||||
|
|
||||||
private static native void setLogger(Sigar sigar, Logger log);
|
private static native void setLogger(Sigar sigar, Logger log);
|
||||||
|
|
||||||
|
@ -118,10 +118,6 @@ public class Iostat extends SigarCommandBase {
|
|||||||
printf(items);
|
printf(items);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String formatSize(long size) {
|
|
||||||
return Sigar.formatSize(size * 1024);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void main(String[] args) throws Exception {
|
public static void main(String[] args) throws Exception {
|
||||||
new Iostat().processCommand(args);
|
new Iostat().processCommand(args);
|
||||||
}
|
}
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
package net.hyperic.sigar.cmd;
|
package net.hyperic.sigar.cmd;
|
||||||
|
|
||||||
import java.io.PrintStream;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.lang.reflect.Method;
|
import java.lang.reflect.Method;
|
||||||
|
|
||||||
import net.hyperic.sigar.Sigar;
|
|
||||||
import net.hyperic.sigar.SigarException;
|
import net.hyperic.sigar.SigarException;
|
||||||
import net.hyperic.sigar.SigarProxy;
|
|
||||||
|
|
||||||
import net.hyperic.sigar.util.GetlineCompleter;
|
import net.hyperic.sigar.util.GetlineCompleter;
|
||||||
|
|
||||||
@ -30,10 +27,6 @@ public class PTQL
|
|||||||
implements GetlineCompleter {
|
implements GetlineCompleter {
|
||||||
|
|
||||||
private Shell shell;
|
private Shell shell;
|
||||||
private PrintStream out = System.out;
|
|
||||||
private Sigar sigar;
|
|
||||||
private SigarProxy proxy;
|
|
||||||
private long[] foundPids = null;
|
|
||||||
private Ps ps;
|
private Ps ps;
|
||||||
private GetlineCompleter m_completer;
|
private GetlineCompleter m_completer;
|
||||||
private Map methods;
|
private Map methods;
|
||||||
@ -42,9 +35,6 @@ public class PTQL
|
|||||||
|
|
||||||
public PTQL(Shell shell) {
|
public PTQL(Shell shell) {
|
||||||
this.shell = shell;
|
this.shell = shell;
|
||||||
this.out = shell.getOutStream();
|
|
||||||
this.sigar = shell.getSigar();
|
|
||||||
this.proxy = shell.getSigarProxy();
|
|
||||||
this.ps = new Ps(this.shell);
|
this.ps = new Ps(this.shell);
|
||||||
this.methods = ProcessQueryBuilder.getMethods();
|
this.methods = ProcessQueryBuilder.getMethods();
|
||||||
this.m_completer =
|
this.m_completer =
|
||||||
|
@ -44,7 +44,6 @@ public class ProcInfo extends SigarCommandBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public void output(long pid) throws SigarException {
|
public void output(long pid) throws SigarException {
|
||||||
String state, mem, time, cred, credname;
|
|
||||||
println("pid=" + pid);
|
println("pid=" + pid);
|
||||||
try {
|
try {
|
||||||
println("state=" + sigar.getProcState(pid));
|
println("state=" + sigar.getProcState(pid));
|
||||||
|
@ -3,8 +3,6 @@ package net.hyperic.sigar.cmd;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
|
|
||||||
import net.hyperic.sigar.Sigar;
|
import net.hyperic.sigar.Sigar;
|
||||||
import net.hyperic.sigar.SigarException;
|
import net.hyperic.sigar.SigarException;
|
||||||
import net.hyperic.sigar.SigarPermissionDeniedException;
|
import net.hyperic.sigar.SigarPermissionDeniedException;
|
||||||
@ -36,7 +34,6 @@ public class Shell extends ShellBase {
|
|||||||
private Sigar sigar = new Sigar();
|
private Sigar sigar = new Sigar();
|
||||||
private SigarProxy proxy = SigarProxyCache.newInstance(this.sigar);
|
private SigarProxy proxy = SigarProxyCache.newInstance(this.sigar);
|
||||||
private long[] foundPids = new long[0];
|
private long[] foundPids = new long[0];
|
||||||
private ArrayList completions = new ArrayList();
|
|
||||||
private boolean isInteractive = false;
|
private boolean isInteractive = false;
|
||||||
|
|
||||||
public Shell() {
|
public Shell() {
|
||||||
|
@ -16,8 +16,6 @@ import net.hyperic.sigar.FileWatcherThread;
|
|||||||
public class Tail {
|
public class Tail {
|
||||||
|
|
||||||
public static void main(String[] args) throws SigarException {
|
public static void main(String[] args) throws SigarException {
|
||||||
final String pattern;
|
|
||||||
|
|
||||||
Sigar sigar = new Sigar();
|
Sigar sigar = new Sigar();
|
||||||
|
|
||||||
FileWatcherThread watcherThread =
|
FileWatcherThread watcherThread =
|
||||||
|
@ -3,7 +3,6 @@ package net.hyperic.sigar.cmd;
|
|||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileFilter;
|
import java.io.FileFilter;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
|
||||||
import net.hyperic.sigar.Sigar;
|
import net.hyperic.sigar.Sigar;
|
||||||
|
@ -585,7 +585,6 @@ public class ProcessQueryBuilder {
|
|||||||
long val, double dval, int ival)
|
long val, double dval, int ival)
|
||||||
throws MalformedQueryException {
|
throws MalformedQueryException {
|
||||||
|
|
||||||
short opcode;
|
|
||||||
HashMap nops;
|
HashMap nops;
|
||||||
|
|
||||||
if ((type == Type.INT) ||
|
if ((type == Type.INT) ||
|
||||||
@ -633,7 +632,6 @@ public class ProcessQueryBuilder {
|
|||||||
throws MalformedQueryException {
|
throws MalformedQueryException {
|
||||||
|
|
||||||
long longVal;
|
long longVal;
|
||||||
short opcode;
|
|
||||||
HashMap nops = LNUMOPS;
|
HashMap nops = LNUMOPS;
|
||||||
|
|
||||||
if (val.equals("$$")) {
|
if (val.equals("$$")) {
|
||||||
|
@ -231,8 +231,6 @@ public class Service extends Win32 {
|
|||||||
|
|
||||||
public void stop(long timeout) throws Win32Exception
|
public void stop(long timeout) throws Win32Exception
|
||||||
{
|
{
|
||||||
long status;
|
|
||||||
|
|
||||||
stop();
|
stop();
|
||||||
|
|
||||||
Waiter waiter =
|
Waiter waiter =
|
||||||
@ -250,8 +248,6 @@ public class Service extends Win32 {
|
|||||||
|
|
||||||
public void start(long timeout) throws Win32Exception
|
public void start(long timeout) throws Win32Exception
|
||||||
{
|
{
|
||||||
long status;
|
|
||||||
|
|
||||||
start();
|
start();
|
||||||
|
|
||||||
Waiter waiter =
|
Waiter waiter =
|
||||||
@ -269,8 +265,6 @@ public class Service extends Win32 {
|
|||||||
|
|
||||||
public void pause(long timeout) throws Win32Exception
|
public void pause(long timeout) throws Win32Exception
|
||||||
{
|
{
|
||||||
long status;
|
|
||||||
|
|
||||||
pause();
|
pause();
|
||||||
|
|
||||||
Waiter waiter =
|
Waiter waiter =
|
||||||
|
Loading…
Reference in New Issue
Block a user