forked from I2P_Developers/i2p.i2p
more misc findbugs
This commit is contained in:
@@ -305,7 +305,8 @@ public class I2PTunnelConnectClient extends I2PTunnelHTTPClientBase implements R
|
||||
else
|
||||
response = SUCCESS_RESPONSE;
|
||||
Runnable onTimeout = new OnTimeout(s, s.getOutputStream(), targetRequest, usingWWWProxy, currentProxy, requestId);
|
||||
I2PTunnelRunner runner = new I2PTunnelRunner(s, i2ps, sockLock, data, response, mySockets, onTimeout);
|
||||
// starts itself
|
||||
new I2PTunnelRunner(s, i2ps, sockLock, data, response, mySockets, onTimeout);
|
||||
} catch (SocketException ex) {
|
||||
_log.info(getPrefix(requestId) + "Error trying to connect", ex);
|
||||
handleConnectClientException(ex, out, targetRequest, usingWWWProxy, currentProxy, requestId);
|
||||
|
@@ -347,7 +347,7 @@ class Connection {
|
||||
_log.debug("Resend in " + timeout + " for " + packet);
|
||||
|
||||
// schedules itself
|
||||
ResendPacketEvent rpe = new ResendPacketEvent(packet, timeout);
|
||||
new ResendPacketEvent(packet, timeout);
|
||||
}
|
||||
|
||||
// warning, getStatLog() can be null
|
||||
|
@@ -300,7 +300,8 @@ public class AddressbookBean
|
||||
} else {
|
||||
boolean valid = true;
|
||||
try {
|
||||
Destination dest = new Destination(destination);
|
||||
// just to check validity
|
||||
new Destination(destination);
|
||||
} catch (DataFormatException dfe) {
|
||||
valid = false;
|
||||
}
|
||||
|
@@ -225,7 +225,8 @@ public class UrlLauncher {
|
||||
|
||||
private boolean validateUrlFormat(String urlString) {
|
||||
try {
|
||||
URL url = new URL(urlString);
|
||||
// just to check validity
|
||||
new URL(urlString);
|
||||
} catch (MalformedURLException e) {
|
||||
return false;
|
||||
}
|
||||
|
@@ -129,10 +129,10 @@ JXQAnA28vDmMMMH/WPbC5ixmJeGGNUiR
|
||||
public static final int HEADER_BYTES = Signature.SIGNATURE_BYTES + VERSION_BYTES;
|
||||
private static final String PROP_TRUSTED_KEYS = "router.trustedUpdateKeys";
|
||||
|
||||
private static I2PAppContext _context;
|
||||
private final I2PAppContext _context;
|
||||
|
||||
private Log _log;
|
||||
private Map<SigningPublicKey, String> _trustedKeys;
|
||||
private final Log _log;
|
||||
private final Map<SigningPublicKey, String> _trustedKeys;
|
||||
private String _newVersion;
|
||||
/** 172 */
|
||||
private static final int KEYSIZE_B64_BYTES = 2 + (SigningPublicKey.KEYSIZE_BYTES * 4 / 3);
|
||||
@@ -155,7 +155,6 @@ JXQAnA28vDmMMMH/WPbC5ixmJeGGNUiR
|
||||
_context = context;
|
||||
_log = _context.logManager().getLog(TrustedUpdate.class);
|
||||
_trustedKeys = new HashMap(4);
|
||||
_newVersion = null;
|
||||
|
||||
String propertyTrustedKeys = context.getProperty(PROP_TRUSTED_KEYS);
|
||||
|
||||
@@ -273,9 +272,9 @@ JXQAnA28vDmMMMH/WPbC5ixmJeGGNUiR
|
||||
private static final boolean genKeysCLI(String publicKeyFile, String privateKeyFile) {
|
||||
FileOutputStream fileOutputStream = null;
|
||||
|
||||
_context = I2PAppContext.getGlobalContext();
|
||||
I2PAppContext context = I2PAppContext.getGlobalContext();
|
||||
try {
|
||||
Object signingKeypair[] = _context.keyGenerator().generateSigningKeypair();
|
||||
Object signingKeypair[] = context.keyGenerator().generateSigningKeypair();
|
||||
SigningPublicKey signingPublicKey = (SigningPublicKey) signingKeypair[0];
|
||||
SigningPrivateKey signingPrivateKey = (SigningPrivateKey) signingKeypair[1];
|
||||
|
||||
|
@@ -379,7 +379,7 @@ class KBucketImpl implements KBucket {
|
||||
}
|
||||
|
||||
private static void testRand() {
|
||||
StringBuilder buf = new StringBuilder(2048);
|
||||
//StringBuilder buf = new StringBuilder(2048);
|
||||
int low = 1;
|
||||
int high = 3;
|
||||
Log log = I2PAppContext.getGlobalContext().logManager().getLog(KBucketImpl.class);
|
||||
|
Reference in New Issue
Block a user