Changeset 62b5b49


Ignore:
Timestamp:
Dec 4, 2016 3:25:38 PM (4 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
b78b3cb
Parents:
7734d3d
Message:

Console: Sort banlist and floodfills in true binary order, not by base64 string

Location:
apps/routerconsole/java/src/net/i2p/router/web
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • apps/routerconsole/java/src/net/i2p/router/web/BanlistRenderer.java

    r7734d3d r62b5b49  
    3232    }
    3333   
     34    /**
     35     *  As of 0.9.29, sorts in true binary order, not base64 string
     36     */
    3437    private static class HashComparator implements Comparator<Hash>, Serializable {
    3538         public int compare(Hash l, Hash r) {
    36              return l.toBase64().compareTo(r.toBase64());
     39             return DataHelper.compareTo(l.getData(), r.getData());
    3740        }
    3841    }
  • apps/routerconsole/java/src/net/i2p/router/web/ProfileOrganizerRenderer.java

    r7734d3d r62b5b49  
    323323    /**
    324324     *  Used for floodfill-only page
     325     *  As of 0.9.29, sorts in true binary order, not base64 string
    325326     *  @since 0.9.8
    326327     */
    327328    private static class HashComparator implements Comparator<PeerProfile>, Serializable {
    328329        public int compare(PeerProfile left, PeerProfile right) {
    329             return left.getPeer().toBase64().compareTo(right.getPeer().toBase64());
     330            return DataHelper.compareTo(left.getPeer().getData(), right.getPeer().getData());
    330331        }
    331332       
Note: See TracChangeset for help on using the changeset viewer.