<Bug code="ST" />
</Match>
<Match>
+ <Class name="org.apache.catalina.startup.TestTomcatClassLoader$ClassLoaderReport"/>
+ <Bug code="Se"/>
+ </Match>
+ <Match>
+ <Class name="org.apache.catalina.tribes.demos.EchoRpcTest" />
+ <Method name="run"/>
+ <Bug code="REC" />
+ </Match>
+ <Match>
<Class name="org.apache.catalina.tribes.demos.EchoRpcTest$SystemExit" />
<Bug code="Dm" />
</Match>
<Bug code="NP" />
</Match>
<Match>
+ <Class name="org.apache.catalina.tribes.demos.LoadTest" />
+ <Method name="memberAdded"/>
+ <Bug code="NN" />
+ </Match>
+ <Match>
+ <Class name="org.apache.catalina.tribes.demos.LoadTest" />
+ <Method name="run"/>
+ <Or>
+ <Bug code="REC" />
+ <Bug code="UW" />
+ </Or>
+ </Match>
+ <Match>
+ <Class name="org.apache.catalina.tribes.demos.LoadTest$SystemExit" />
+ <Bug code="Dm" />
+ </Match>
+ <Match>
<Class name="org.apache.catalina.tribes.demos.MapDemo$SystemExit" />
<Bug code="Dm" />
</Match>
for ( int i=0; i<status.length; i++ ) status[i] = new Status(this);
printScreen();
String l = reader.readLine();
- String[] args = tokenize(l);
+ String[] args;
+ if (l == null) {
+ args = new String[] {};
+ } else {
+ args = tokenize(l);
+ }
while ( args.length >= 1 && (!"quit".equalsIgnoreCase(args[0]))) {
if ("start".equalsIgnoreCase(args[0])) {
cmdStart(args);
}
printScreen();
l = reader.readLine();
- args = tokenize(l);
+ if (l != null) {
+ args = tokenize(l);
+ }
}
for ( int i=0; i<status.length; i++ ) status[i].stop();
}
Member lm = channel.getLocalMember(false);
local = lm!=null?lm.getName():"";
coord = interceptor!=null && interceptor.getCoordinator()!=null?interceptor.getCoordinator().getName():"";
- viewId = getByteString(interceptor.getViewId()!=null?interceptor.getViewId().getBytes():new byte[0]);
- count = String.valueOf(interceptor.getView().length);
+ if (interceptor != null) {
+ viewId = getByteString(interceptor.getViewId()!=null?interceptor.getViewId().getBytes():new byte[0]);
+ count = String.valueOf(interceptor.getView().length);
+ }
}
buf.append(leftfill(local,30," "));
buf.append(leftfill(startstatus, 10, " "));
import java.io.File;
import java.io.FileInputStream;
+import java.io.IOException;
import java.io.InputStream;
import java.security.KeyManagementException;
import java.security.KeyStore;
private static KeyStore getKeyStore(String keystore) throws Exception {
File keystoreFile = new File(keystore);
- InputStream is = new FileInputStream(keystoreFile);
KeyStore ks = KeyStore.getInstance("JKS");
- ks.load(is, "changeit".toCharArray());
+ InputStream is = null;
+ try {
+ is = new FileInputStream(keystoreFile);
+ ks.load(is, "changeit".toCharArray());
+ } finally {
+ if (is != null) {
+ try {
+ is.close();
+ } catch (IOException ioe) {
+ // Ignore
+ }
+ }
+ }
return ks;
}
}