Debug: Case-insensitive sort of PortMapper and AppManager tables

This commit is contained in:
zzz
2018-05-03 13:08:56 +00:00
parent a548c307bc
commit 9c52d454f8
2 changed files with 5 additions and 3 deletions

View File

@@ -3,6 +3,7 @@ package net.i2p.util;
import java.io.IOException;
import java.io.Writer;
import java.net.InetSocketAddress;
import java.text.Collator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
@@ -305,7 +306,7 @@ public class PortMapper {
public void renderStatusHTML(Writer out) throws IOException {
List<String> services = new ArrayList<String>(_dir.keySet());
out.write("<h2 id=\"debug_portmapper\">Port Mapper</h2><table id=\"portmapper\"><tr><th>Service<th>Host<th>Port\n");
Collections.sort(services);
Collections.sort(services, Collator.getInstance());
for (String s : services) {
InetSocketAddress ia = _dir.get(s);
if (ia == null)

View File

@@ -2,6 +2,7 @@ package net.i2p.router.startup;
import java.io.IOException;
import java.io.Writer;
import java.text.Collator;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.Collections;
@@ -208,7 +209,7 @@ public class RouterAppManager extends ClientAppManagerImpl {
String[] val = entry.getValue();
list.add("[<b>" + key.getName() + "</b>] = [" + key.getClass().getName() + ' ' + Arrays.toString(val) + "] <i>" + key.getState() + "</i><br>");
}
Collections.sort(list);
Collections.sort(list, Collator.getInstance());
for (String e : list) {
buf.append(e);
}
@@ -225,7 +226,7 @@ public class RouterAppManager extends ClientAppManagerImpl {
ClientApp val = entry.getValue();
list.add("[<b>" + key + "</b>] = [" + val.getClass().getName() + "]<br>");
}
Collections.sort(list);
Collections.sort(list, Collator.getInstance());
for (String e : list) {
buf.append(e);
}