Changeset 74151b0 for core


Ignore:
Timestamp:
Mar 6, 2017 4:59:59 AM (3 years ago)
Author:
str4d <str4d@…>
Branches:
master
Children:
c12312f
Parents:
5f96067 (diff), de7a4ba (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

propagate from branch 'i2p.i2p' (head 600cd73c4b46b7ba8c421149785f6245afa47487)

to branch 'i2p.i2p.str4d.ui' (head d5b54214bfe1bf5203f614600b916346a10f26dd)

Location:
core/java/src/net/i2p
Files:
2 edited

Legend:

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

    r5f96067 r74151b0  
    15611561        DecimalFormat fmt = new DecimalFormat("##0.00");
    15621562
     1563        // Replace &nbsp; with thin non-breaking space &#8239; (more consistent/predictable width between fonts & point sizes)
     1564
    15631565        String str = fmt.format(val);
    15641566        switch (scale) {
    1565             case 1: return str + "&nbsp;K";
    1566             case 2: return str + "&nbsp;M";
    1567             case 3: return str + "&nbsp;G";
    1568             case 4: return str + "&nbsp;T";
    1569             case 5: return str + "&nbsp;P";
    1570             case 6: return str + "&nbsp;E";
    1571             case 7: return str + "&nbsp;Z";
    1572             case 8: return str + "&nbsp;Y";
    1573             default: return bytes + "&nbsp;";
     1567            case 1: return str + "&#8239;K";
     1568            case 2: return str + "&#8239;M";
     1569            case 3: return str + "&#8239;G";
     1570            case 4: return str + "&#8239;T";
     1571            case 5: return str + "&#8239;P";
     1572            case 6: return str + "&#8239;E";
     1573            case 7: return str + "&#8239;Z";
     1574            case 8: return str + "&#8239;Y";
     1575            default: return bytes + "&#8239;";
    15741576        }
    15751577    }
  • core/java/src/net/i2p/kademlia/KBucketSet.java

    r5f96067 r74151b0  
    766766    public String toString() {
    767767        StringBuilder buf = new StringBuilder(1024);
    768         buf.append("Bucket set rooted on: ").append(_us.toString())
     768        buf.append("<hr><b>Bucket set rooted on:</b> ").append(_us.toString())
    769769           .append(" K=").append(BUCKET_SIZE)
    770770           .append(" B=").append(B_VALUE)
    771771           .append(" with ").append(size())
    772            .append(" keys in ").append(_buckets.size()).append(" buckets:\n");
     772           .append(" keys in ").append(_buckets.size()).append(" buckets:<br>\n");
    773773        getReadLock();
    774774        try {
     
    776776            for (int i = 0; i < len; i++) {
    777777                KBucket<T> b = _buckets.get(i);
    778                 buf.append("* Bucket ").append(i).append("/").append(len).append(": ");
    779                 buf.append(b.toString()).append("\n");
     778                buf.append("<b>Bucket ").append(i).append("/").append(len).append(":</b> ");
     779                buf.append(b.toString()).append("<br>\n");
    780780            }
    781781        } finally { releaseReadLock(); }
Note: See TracChangeset for help on using the changeset viewer.