forked from I2P_Developers/i2p.i2p
Console: Sort banlist and floodfills in true binary order, not by base64 string
This commit is contained in:
@ -31,9 +31,12 @@ class BanlistRenderer {
|
|||||||
_context = context;
|
_context = context;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* As of 0.9.29, sorts in true binary order, not base64 string
|
||||||
|
*/
|
||||||
private static class HashComparator implements Comparator<Hash>, Serializable {
|
private static class HashComparator implements Comparator<Hash>, Serializable {
|
||||||
public int compare(Hash l, Hash r) {
|
public int compare(Hash l, Hash r) {
|
||||||
return l.toBase64().compareTo(r.toBase64());
|
return DataHelper.compareTo(l.getData(), r.getData());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -322,11 +322,12 @@ class ProfileOrganizerRenderer {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Used for floodfill-only page
|
* Used for floodfill-only page
|
||||||
|
* As of 0.9.29, sorts in true binary order, not base64 string
|
||||||
* @since 0.9.8
|
* @since 0.9.8
|
||||||
*/
|
*/
|
||||||
private static class HashComparator implements Comparator<PeerProfile>, Serializable {
|
private static class HashComparator implements Comparator<PeerProfile>, Serializable {
|
||||||
public int compare(PeerProfile left, PeerProfile right) {
|
public int compare(PeerProfile left, PeerProfile right) {
|
||||||
return left.getPeer().toBase64().compareTo(right.getPeer().toBase64());
|
return DataHelper.compareTo(left.getPeer().getData(), right.getPeer().getData());
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user