Changeset 9a45ba1


Ignore:
Timestamp:
Sep 16, 2011 2:34:29 PM (9 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
ba9754a
Parents:
46481fb
Message:

toString() improvement for debugging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • core/java/src/net/i2p/data/i2cp/SessionConfig.java

    r46481fb r9a45ba1  
    1616import java.util.Date;
    1717import java.util.Iterator;
     18import java.util.Map;
    1819import java.util.Properties;
    1920
     
    2728import net.i2p.util.Clock;
    2829import net.i2p.util.Log;
     30import net.i2p.util.OrderedProperties;
    2931
    3032/**
     
    222224        buf.append("\n\tSignature: ").append(getSignature());
    223225        buf.append("\n\tCreation Date: ").append(getCreationDate());
    224         buf.append("\n\tOptions: #: ").append(getOptions().size());
    225         for (Iterator iter = getOptions().keySet().iterator(); iter.hasNext();) {
    226             String key = (String) iter.next();
    227             String val = getOptions().getProperty(key);
     226        buf.append("\n\tOptions: #: ").append(_options.size());
     227        Properties sorted = new OrderedProperties();
     228        sorted.putAll(_options);
     229        for (Map.Entry e : sorted.entrySet()) {
     230            String key = (String) e.getKey();
     231            String val = (String) e.getValue();
    228232            buf.append("\n\t\t[").append(key).append("] = [").append(val).append("]");
    229233        }
Note: See TracChangeset for help on using the changeset viewer.