Author: j16sdiz
Date: 2008-04-11 07:56:57 +0000 (Fri, 11 Apr 2008)
New Revision: 19165
Modified:
trunk/freenet/src/freenet/node/NodeStats.java
Log:
findbugs: integer division cast to double -> we should use floating point math
Modified: trunk/freenet/src/freenet/node/NodeStats.java
===================================================================
--- trunk/freenet/src/freenet/node/NodeStats.java 2008-04-11 07:56:34 UTC
(rev 19164)
+++ trunk/freenet/src/freenet/node/NodeStats.java 2008-04-11 07:56:57 UTC
(rev 19165)
@@ -495,7 +495,7 @@
// So impose a minimum of 20% of the bandwidth limit.
// This will ensure we don't get stuck in any situation where
all our bandwidth is overhead,
// and we don't accept any requests because of that, so it
remains that way...
- outputAvailablePerSecond = Math.max(outputAvailablePerSecond,
node.getOutputBandwidthLimit() / 5);
+ outputAvailablePerSecond = Math.max(outputAvailablePerSecond,
node.getOutputBandwidthLimit() / 5.0);
double bandwidthAvailableOutput = outputAvailablePerSecond * 90;
// 90 seconds at full power; we have to leave some time for the
search as well