forked from I2P_Developers/i2p.i2p
propagate from branch 'i2p.i2p.str4d.cleanup' (head 736423cc308e964bab55068e625f8a1852932ec5)
to branch 'i2p.i2p' (head 0ac335d5dc4ccaeb113af4fb5c0e993a6f42fdbe)
This commit is contained in:
@@ -1535,7 +1535,7 @@ public class ConsoleUpdateManager implements UpdateManager {
|
||||
}
|
||||
|
||||
/** debug */
|
||||
private static void toString(StringBuilder buf, Collection col) {
|
||||
private static void toString(StringBuilder buf, Collection<?> col) {
|
||||
List<String> list = new ArrayList<String>(col.size());
|
||||
for (Object o : col) {
|
||||
list.add(o.toString());
|
||||
@@ -1549,7 +1549,7 @@ public class ConsoleUpdateManager implements UpdateManager {
|
||||
/** debug */
|
||||
private static void toString(StringBuilder buf, Map<?, ?> map) {
|
||||
List<String> list = new ArrayList<String>(map.size());
|
||||
for (Map.Entry entry : map.entrySet()) {
|
||||
for (Map.Entry<?, ?> entry : map.entrySet()) {
|
||||
String key = entry.getKey().toString();
|
||||
String val = entry.getValue().toString();
|
||||
list.add("[" + key + "] = [" + val + "]<br>");
|
||||
|
||||
@@ -3,7 +3,6 @@ package net.i2p.router.web;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
@@ -139,8 +138,7 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
buf.append("<tr><th align=\"right\">" + _("WebApp") + "</th><th>" + _("Run at Startup?") + "</th><th>" + _("Control") + "</th><th align=\"left\">" + _("Description") + "</th></tr>\n");
|
||||
Properties props = RouterConsoleRunner.webAppProperties(_context);
|
||||
Set<String> keys = new TreeSet(props.keySet());
|
||||
for (Iterator<String> iter = keys.iterator(); iter.hasNext(); ) {
|
||||
String name = iter.next();
|
||||
for (String name : keys) {
|
||||
if (name.startsWith(RouterConsoleRunner.PREFIX) && name.endsWith(RouterConsoleRunner.ENABLED)) {
|
||||
String app = name.substring(RouterConsoleRunner.PREFIX.length(), name.lastIndexOf(RouterConsoleRunner.ENABLED));
|
||||
String val = props.getProperty(name);
|
||||
@@ -165,8 +163,7 @@ public class ConfigClientsHelper extends HelperBase {
|
||||
buf.append("<tr><th align=\"right\">" + _("Plugin") + "</th><th>" + _("Run at Startup?") + "</th><th>" + _("Control") + "</th><th align=\"left\">" + _("Description") + "</th></tr>\n");
|
||||
Properties props = PluginStarter.pluginProperties();
|
||||
Set<String> keys = new TreeSet(props.keySet());
|
||||
for (Iterator<String> iter = keys.iterator(); iter.hasNext(); ) {
|
||||
String name = iter.next();
|
||||
for (String name : keys) {
|
||||
if (name.startsWith(PluginStarter.PREFIX) && name.endsWith(PluginStarter.ENABLED)) {
|
||||
String app = name.substring(PluginStarter.PREFIX.length(), name.lastIndexOf(PluginStarter.ENABLED));
|
||||
String val = props.getProperty(name);
|
||||
|
||||
@@ -418,8 +418,8 @@ public class NetDbRenderer {
|
||||
int cost = addr.getCost();
|
||||
if (!((style.equals("SSU") && cost == 5) || (style.equals("NTCP") && cost == 10)))
|
||||
buf.append('[').append(_("cost")).append('=').append("" + cost).append("] ");
|
||||
Map p = addr.getOptionsMap();
|
||||
for (Map.Entry e : (Set<Map.Entry>) p.entrySet()) {
|
||||
Map<Object, Object> p = addr.getOptionsMap();
|
||||
for (Map.Entry<Object, Object> e : p.entrySet()) {
|
||||
String name = (String) e.getKey();
|
||||
String val = (String) e.getValue();
|
||||
buf.append('[').append(_(DataHelper.stripHTML(name))).append('=').append(DataHelper.stripHTML(val)).append("] ");
|
||||
@@ -428,8 +428,8 @@ public class NetDbRenderer {
|
||||
buf.append("</td></tr>\n");
|
||||
if (full) {
|
||||
buf.append("<tr><td>" + _("Stats") + ": <br><code>");
|
||||
Map p = info.getOptionsMap();
|
||||
for (Map.Entry e : (Set<Map.Entry>) p.entrySet()) {
|
||||
Map<Object, Object> p = info.getOptionsMap();
|
||||
for (Map.Entry<Object, Object> e : p.entrySet()) {
|
||||
String key = (String) e.getKey();
|
||||
String val = (String) e.getValue();
|
||||
buf.append(DataHelper.stripHTML(key)).append(" = ").append(DataHelper.stripHTML(val)).append("<br>\n");
|
||||
|
||||
@@ -832,7 +832,7 @@ public class PluginStarter implements Runnable {
|
||||
*/
|
||||
private static void addPath(URL u) throws Exception {
|
||||
URLClassLoader urlClassLoader = (URLClassLoader) ClassLoader.getSystemClassLoader();
|
||||
Class urlClass = URLClassLoader.class;
|
||||
Class<URLClassLoader> urlClass = URLClassLoader.class;
|
||||
Method method = urlClass.getDeclaredMethod("addURL", new Class[]{URL.class});
|
||||
method.setAccessible(true);
|
||||
method.invoke(urlClassLoader, new Object[]{u});
|
||||
|
||||
@@ -4,7 +4,6 @@ import java.io.IOException;
|
||||
import java.io.Writer;
|
||||
import java.text.DecimalFormat;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.Set;
|
||||
import java.util.TreeSet;
|
||||
|
||||
@@ -45,8 +44,7 @@ class ProfileOrganizerRenderer {
|
||||
Set<PeerProfile> order = new TreeSet<PeerProfile>(mode == 2 ? new HashComparator() : new ProfileComparator());
|
||||
int older = 0;
|
||||
int standard = 0;
|
||||
for (Iterator<Hash> iter = peers.iterator(); iter.hasNext();) {
|
||||
Hash peer = iter.next();
|
||||
for (Hash peer : peers) {
|
||||
if (_organizer.getUs().equals(peer)) continue;
|
||||
PeerProfile prof = _organizer.getProfile(peer);
|
||||
if (mode == 2) {
|
||||
@@ -94,8 +92,7 @@ class ProfileOrganizerRenderer {
|
||||
buf.append("<th> </th>");
|
||||
buf.append("</tr>");
|
||||
int prevTier = 1;
|
||||
for (Iterator<PeerProfile> iter = order.iterator(); iter.hasNext();) {
|
||||
PeerProfile prof = iter.next();
|
||||
for (PeerProfile prof : order) {
|
||||
Hash peer = prof.getPeer();
|
||||
|
||||
int tier = 0;
|
||||
@@ -217,8 +214,7 @@ class ProfileOrganizerRenderer {
|
||||
buf.append("<th class=\"smallhead\">").append(_("1d Fail Rate")).append("</th>");
|
||||
buf.append("</tr>");
|
||||
RateAverages ra = RateAverages.getTemp();
|
||||
for (Iterator<PeerProfile> iter = order.iterator(); iter.hasNext();) {
|
||||
PeerProfile prof = iter.next();
|
||||
for (PeerProfile prof : order) {
|
||||
Hash peer = prof.getPeer();
|
||||
|
||||
buf.append("<tr><td align=\"center\" nowrap>");
|
||||
|
||||
@@ -7,7 +7,6 @@ import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.Comparator;
|
||||
import java.util.Iterator;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.TreeSet;
|
||||
@@ -417,8 +416,7 @@ public class SummaryHelper extends HelperBase {
|
||||
Collections.sort(clients, new AlphaComparator());
|
||||
buf.append("<table>");
|
||||
|
||||
for (Iterator<Destination> iter = clients.iterator(); iter.hasNext(); ) {
|
||||
Destination client = iter.next();
|
||||
for (Destination client : clients) {
|
||||
String name = getName(client);
|
||||
Hash h = client.calculateHash();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user