* Clone System properties before iterating to avoid

ConcurrentModificationException (ticket #680)
This commit is contained in:
zzz
2012-08-06 14:45:37 +00:00
parent 91e61dbd5c
commit 1ab8200c7f
7 changed files with 23 additions and 15 deletions

View File

@ -124,8 +124,7 @@ public class SAMStreamSession {
_log.debug("SAM STREAM session instantiated");
Properties allprops = new Properties();
allprops.putAll(System.getProperties());
Properties allprops = (Properties) System.getProperties().clone();
allprops.putAll(props);
String i2cpHost = allprops.getProperty(I2PClient.PROP_TCP_HOST, "127.0.0.1");

View File

@ -85,8 +85,7 @@ public class SAMv3StreamSession extends SAMStreamSession implements SAMv3Handle
_log.debug("SAM STREAM session instantiated");
Properties allprops = new Properties();
allprops.putAll(System.getProperties());
Properties allprops = (Properties) System.getProperties().clone();
allprops.putAll(rec.getProps());
String i2cpHost = allprops.getProperty(I2PClient.PROP_TCP_HOST, "127.0.0.1");