forked from I2P_Developers/i2p.i2p
remove unnecessary casts (eclipse)
This commit is contained in:
@ -176,7 +176,7 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
"value=\"");
|
||||
for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) {
|
||||
String prop = (String)iter.next();
|
||||
String val = (String)props.getProperty(prop);
|
||||
String val = props.getProperty(prop);
|
||||
buf.append(prop).append('=').append(val).append(' ');
|
||||
}
|
||||
buf.append("\"></td></tr>\n");
|
||||
@ -189,7 +189,7 @@ public class ConfigTunnelsHelper extends HelperBase {
|
||||
"value=\"");
|
||||
for (Iterator iter = props.keySet().iterator(); iter.hasNext(); ) {
|
||||
String prop = (String)iter.next();
|
||||
String val = (String)props.getProperty(prop);
|
||||
String val = props.getProperty(prop);
|
||||
buf.append(prop).append('=').append(val).append(' ');
|
||||
}
|
||||
buf.append("\"></td></tr>\n");
|
||||
|
@ -161,7 +161,7 @@ public class PluginUpdateHandler extends UpdateHandler {
|
||||
StringBuilder buf = new StringBuilder(64);
|
||||
buf.append("<b>").append(_("Downloading plugin")).append(' ');
|
||||
double pct = ((double)alreadyTransferred + (double)currentWrite) /
|
||||
((double)alreadyTransferred + (double)currentWrite + (double)bytesRemaining);
|
||||
((double)alreadyTransferred + (double)currentWrite + bytesRemaining);
|
||||
synchronized (_pct) {
|
||||
buf.append(_pct.format(pct));
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ class SummaryListener implements RateSummaryListener {
|
||||
// add one value to the db (the average value for the period)
|
||||
try {
|
||||
_sample.setTime(when);
|
||||
double val = eventCount > 0 ? (totalValue / (double)eventCount) : 0d;
|
||||
double val = eventCount > 0 ? (totalValue / eventCount) : 0d;
|
||||
_sample.setValue(_name, val);
|
||||
_sample.setValue(_eventName, eventCount);
|
||||
//_sample.setValue(0, val);
|
||||
|
@ -118,7 +118,7 @@ public class TunnelRenderer {
|
||||
lifetime = 1;
|
||||
if (lifetime > 10*60)
|
||||
lifetime = 10*60;
|
||||
int bps = 1024 * (int) cfg.getProcessedMessagesCount() / lifetime;
|
||||
int bps = 1024 * cfg.getProcessedMessagesCount() / lifetime;
|
||||
out.write("<td class=\"cells\" align=\"center\">" + bps + " Bps</td>");
|
||||
if (cfg.getSendTo() == null)
|
||||
out.write("<td class=\"cells\" align=\"center\">" + _("Outbound Endpoint") + "</td>");
|
||||
@ -139,7 +139,7 @@ public class TunnelRenderer {
|
||||
|
||||
private static class TunnelComparator implements Comparator<HopConfig> {
|
||||
public int compare(HopConfig l, HopConfig r) {
|
||||
return (int) (r.getProcessedMessagesCount() - l.getProcessedMessagesCount());
|
||||
return (r.getProcessedMessagesCount() - l.getProcessedMessagesCount());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -236,7 +236,7 @@ public class UpdateHandler {
|
||||
StringBuilder buf = new StringBuilder(64);
|
||||
buf.append("<b>").append(_("Updating")).append("</b> ");
|
||||
double pct = ((double)alreadyTransferred + (double)currentWrite) /
|
||||
((double)alreadyTransferred + (double)currentWrite + (double)bytesRemaining);
|
||||
((double)alreadyTransferred + (double)currentWrite + bytesRemaining);
|
||||
synchronized (_pct) {
|
||||
buf.append(_pct.format(pct));
|
||||
}
|
||||
|
Reference in New Issue
Block a user