remove unnecessary casts (eclipse)

This commit is contained in:
zzz
2012-03-25 20:42:41 +00:00
parent ed13424913
commit 3e889d2747
59 changed files with 141 additions and 141 deletions

View File

@ -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");

View File

@ -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));
}

View File

@ -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);

View File

@ -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());
}
}

View File

@ -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));
}