SAM: type arguments, unused imports

This commit is contained in:
str4d
2013-11-22 04:22:14 +00:00
parent 552dd189a5
commit 5fa0376f58
3 changed files with 5 additions and 9 deletions

View File

@@ -244,8 +244,8 @@ public class SAMBridge implements Runnable, ClientApp {
FileOutputStream out = null; FileOutputStream out = null;
try { try {
out = new FileOutputStream(persistFilename); out = new FileOutputStream(persistFilename);
for (Iterator iter = nameToPrivKeys.keySet().iterator(); iter.hasNext(); ) { for (Iterator<String> iter = nameToPrivKeys.keySet().iterator(); iter.hasNext(); ) {
String name = (String)iter.next(); String name = iter.next();
String privKeys = nameToPrivKeys.get(name); String privKeys = nameToPrivKeys.get(name);
out.write(name.getBytes()); out.write(name.getBytes());
out.write('='); out.write('=');

View File

@@ -381,15 +381,15 @@ public class SAMStreamSession {
*/ */
private void removeAllSocketHandlers() { private void removeAllSocketHandlers() {
Integer id; Integer id;
Set keySet; Set<Integer> keySet;
Iterator iter; Iterator<Integer> iter;
synchronized (handlersMapLock) { synchronized (handlersMapLock) {
keySet = handlersMap.keySet(); keySet = handlersMap.keySet();
iter = keySet.iterator(); iter = keySet.iterator();
while (iter.hasNext()) { while (iter.hasNext()) {
id = (Integer)iter.next(); id = iter.next();
handlersMap.get(id).stopRunning(); handlersMap.get(id).stopRunning();
sendersMap.get(id).shutDownGracefully(); sendersMap.get(id).shutDownGracefully();
} }

View File

@@ -8,7 +8,6 @@ package net.i2p.sam;
* *
*/ */
import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InterruptedIOException; import java.io.InterruptedIOException;
import java.net.ConnectException; import java.net.ConnectException;
@@ -16,12 +15,9 @@ import java.net.NoRouteToHostException;
import java.util.Properties; import java.util.Properties;
import net.i2p.I2PException; import net.i2p.I2PException;
import net.i2p.client.I2PClient;
import net.i2p.client.streaming.I2PServerSocket; import net.i2p.client.streaming.I2PServerSocket;
import net.i2p.client.streaming.I2PSocket; import net.i2p.client.streaming.I2PSocket;
import net.i2p.client.streaming.I2PSocketManagerFactory;
import net.i2p.client.streaming.I2PSocketOptions; import net.i2p.client.streaming.I2PSocketOptions;
import net.i2p.data.Base64;
import net.i2p.data.DataFormatException; import net.i2p.data.DataFormatException;
import net.i2p.data.Destination; import net.i2p.data.Destination;
import net.i2p.util.I2PAppThread; import net.i2p.util.I2PAppThread;