forked from I2P_Developers/i2p.i2p
Findbugs all over
This commit is contained in:
@ -189,7 +189,7 @@ class Daemon {
|
||||
Destination oldDest;
|
||||
if (knownNames != null) {
|
||||
oldDest = null;
|
||||
isKnown = key != null ? knownNames.contains(key) : null;
|
||||
isKnown = key != null ? knownNames.contains(key) : false;
|
||||
} else {
|
||||
oldDest = key != null ? router.lookup(key) : null;
|
||||
isKnown = oldDest != null;
|
||||
@ -803,7 +803,7 @@ class Daemon {
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
Daemon daemon = new Daemon();
|
||||
if (args != null && args.length > 0 && args[0].equals("test"))
|
||||
if (args.length > 0 && args[0].equals("test"))
|
||||
daemon.test(args);
|
||||
else
|
||||
daemon.run(args);
|
||||
@ -823,11 +823,14 @@ class Daemon {
|
||||
ctx.logManager().flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* @param args may be null
|
||||
*/
|
||||
public void run(String[] args) {
|
||||
_running = true;
|
||||
String settingsLocation = "config.txt";
|
||||
File homeFile;
|
||||
if (args.length > 0) {
|
||||
if (args != null && args.length > 0) {
|
||||
homeFile = new SecureDirectory(args[0]);
|
||||
if (!homeFile.isAbsolute())
|
||||
homeFile = new SecureDirectory(I2PAppContext.getGlobalContext().getRouterDir(), args[0]);
|
||||
|
@ -590,12 +590,7 @@ public class BlockFile implements Closeable {
|
||||
_isClosed = true;
|
||||
metaIndex.close();
|
||||
|
||||
Set<String> oi = openIndices.keySet();
|
||||
Iterator<String> i = oi.iterator();
|
||||
Object k;
|
||||
while(i.hasNext()) {
|
||||
k = i.next();
|
||||
BSkipList bsl = openIndices.get(k);
|
||||
for (BSkipList bsl : openIndices.values()) {
|
||||
bsl.close();
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user