Changeset 53ce3c4


Ignore:
Timestamp:
Jan 3, 2009 12:05:03 AM (12 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
5c1864e, 9477b13
Parents:
d61af12
Message:

sort torrents with a locale-based sort

File:
1 edited

Legend:

Unmodified
Added
Removed
  • apps/i2psnark/java/src/org/klomp/snark/web/I2PSnarkServlet.java

    rd61af12 r53ce3c4  
    66import java.io.IOException;
    77import java.io.PrintWriter;
     8import java.text.Collator;
    89import java.util.ArrayList;
    910import java.util.Iterator;
     
    379380    private List getSortedSnarks(HttpServletRequest req) {
    380381        Set files = _manager.listTorrentFiles();
    381         TreeSet fileNames = new TreeSet(files); // sorts it alphabetically
     382        TreeSet fileNames = new TreeSet(Collator.getInstance()); // sorts it alphabetically
     383        fileNames.addAll(files);
    382384        ArrayList rv = new ArrayList(fileNames.size());
    383385        for (Iterator iter = fileNames.iterator(); iter.hasNext(); ) {
Note: See TracChangeset for help on using the changeset viewer.