forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p' (head d12a1fd746cd9314de5de5e1000c02cf4c59100d)
to branch 'i2p.i2p.str4d.cleanup' (head e20c143dd50a9c802999068a95e12198b07e4c36)
This commit is contained in:
@@ -366,7 +366,7 @@ public class I2PTunnel extends EventDispatcherImpl implements Logging {
|
||||
* @since 0.9.1
|
||||
*/
|
||||
public void setClientOptions(Properties opts) {
|
||||
for (Iterator iter = _clientOptions.keySet().iterator(); iter.hasNext();) {
|
||||
for (Iterator<Object> iter = _clientOptions.keySet().iterator(); iter.hasNext();) {
|
||||
Object key = iter.next();
|
||||
if (!opts.containsKey(key))
|
||||
iter.remove();
|
||||
|
@@ -365,7 +365,7 @@ public class I2PTunnelServer extends I2PTunnelTask implements Runnable {
|
||||
*/
|
||||
private void buildSocketMap(Properties props) {
|
||||
_socketMap.clear();
|
||||
for (Map.Entry e : props.entrySet()) {
|
||||
for (Map.Entry<Object, Object> e : props.entrySet()) {
|
||||
String key = (String) e.getKey();
|
||||
if (key.startsWith("targetForPort.")) {
|
||||
key = key.substring("targetForPort.".length());
|
||||
|
@@ -413,7 +413,7 @@ public class TunnelController implements Logging {
|
||||
*/
|
||||
public Properties getClientOptionProps() {
|
||||
Properties opts = new Properties();
|
||||
for (Map.Entry e : _config.entrySet()) {
|
||||
for (Map.Entry<Object, Object> e : _config.entrySet()) {
|
||||
String key = (String) e.getKey();
|
||||
if (key.startsWith("option.")) {
|
||||
key = key.substring("option.".length());
|
||||
@@ -471,7 +471,7 @@ public class TunnelController implements Logging {
|
||||
*/
|
||||
public void setConfig(Properties config, String prefix) {
|
||||
Properties props = new Properties();
|
||||
for (Map.Entry e : config.entrySet()) {
|
||||
for (Map.Entry<Object, Object> e : config.entrySet()) {
|
||||
String key = (String) e.getKey();
|
||||
if (key.startsWith(prefix)) {
|
||||
key = key.substring(prefix.length());
|
||||
@@ -516,7 +516,7 @@ public class TunnelController implements Logging {
|
||||
*/
|
||||
public Properties getConfig(String prefix) {
|
||||
Properties rv = new Properties();
|
||||
for (Map.Entry e : _config.entrySet()) {
|
||||
for (Map.Entry<Object, Object> e : _config.entrySet()) {
|
||||
String key = (String) e.getKey();
|
||||
String val = (String) e.getValue();
|
||||
rv.setProperty(prefix + key, val);
|
||||
@@ -538,7 +538,7 @@ public class TunnelController implements Logging {
|
||||
*/
|
||||
public String getClientOptions() {
|
||||
StringBuilder opts = new StringBuilder(64);
|
||||
for (Map.Entry e : _config.entrySet()) {
|
||||
for (Map.Entry<Object, Object> e : _config.entrySet()) {
|
||||
String key = (String) e.getKey();
|
||||
if (key.startsWith("option.")) {
|
||||
key = key.substring("option.".length());
|
||||
|
@@ -70,7 +70,7 @@ public class I2PSOCKSTunnel extends I2PTunnelClientBase {
|
||||
private void parseOptions() {
|
||||
Properties opts = getTunnel().getClientOptions();
|
||||
proxies = new HashMap<String, List<String>>(1);
|
||||
for (Map.Entry e : opts.entrySet()) {
|
||||
for (Map.Entry<Object, Object> e : opts.entrySet()) {
|
||||
String prop = (String)e.getKey();
|
||||
if ((!prop.startsWith(PROP_PROXY_PREFIX)) || prop.length() <= PROP_PROXY_PREFIX.length())
|
||||
continue;
|
||||
|
@@ -373,7 +373,7 @@ public class EditBean extends IndexBean {
|
||||
boolean isMD5Proxy = "httpclient".equals(tun.getType()) ||
|
||||
"connectclient".equals(tun.getType());
|
||||
Map<String, String> sorted = new TreeMap<String, String>();
|
||||
for (Map.Entry e : opts.entrySet()) {
|
||||
for (Map.Entry<Object, Object> e : opts.entrySet()) {
|
||||
String key = (String)e.getKey();
|
||||
if (_noShowSet.contains(key))
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user