Changeset 1ab8200 for apps/ministreaming


Ignore:
Timestamp:
Aug 6, 2012 2:45:37 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
9c7f4cc6
Parents:
91e61db
Message:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/ministreaming/java/src/net/i2p/client/streaming/I2PSocketManagerFactory.java

    r91e61db r1ab8200  
    77import java.lang.reflect.Constructor;
    88import java.util.Iterator;
     9import java.util.Map;
    910import java.util.Properties;
    1011
     
    3738     */
    3839    public static I2PSocketManager createManager() {
    39         return createManager(getHost(), getPort(), System.getProperties());
     40        return createManager(getHost(), getPort(), (Properties) System.getProperties().clone());
    4041    }
    4142   
     
    6061     */
    6162    public static I2PSocketManager createManager(String host, int port) {
    62         return createManager(host, port, System.getProperties());
     63        return createManager(host, port, (Properties) System.getProperties().clone());
    6364    }
    6465
     
    9697     */
    9798    public static I2PSocketManager createManager(InputStream myPrivateKeyStream) {
    98         return createManager(myPrivateKeyStream, getHost(), getPort(), System.getProperties());
     99        return createManager(myPrivateKeyStream, getHost(), getPort(), (Properties) System.getProperties().clone());
    99100    }
    100101   
     
    127128        if (opts == null)
    128129            opts = new Properties();
    129         for (Iterator iter = System.getProperties().keySet().iterator(); iter.hasNext(); ) {
    130             String name = (String)iter.next();
     130        Properties syscopy = (Properties) System.getProperties().clone();
     131        for (Map.Entry e : syscopy.entrySet()) {
     132            String name = (String) e.getKey();
    131133            if (!opts.containsKey(name))
    132                 opts.setProperty(name, System.getProperty(name));
     134                opts.setProperty(name, (String) e.getValue());
    133135        }
    134136        //boolean oldLib = DEFAULT_MANAGER.equals(opts.getProperty(PROP_MANAGER, DEFAULT_MANAGER));
Note: See TracChangeset for help on using the changeset viewer.