diff --git a/core/src/main/groovy/com/muwire/core/upload/ContentUploader.groovy b/core/src/main/groovy/com/muwire/core/upload/ContentUploader.groovy index 3cb70626..e25b28da 100644 --- a/core/src/main/groovy/com/muwire/core/upload/ContentUploader.groovy +++ b/core/src/main/groovy/com/muwire/core/upload/ContentUploader.groovy @@ -106,7 +106,7 @@ class ContentUploader extends Uploader { return done ? 100 : 0 int position = mapped.position() int total = request.getRange().end - request.getRange().start - (int)(position * 100.0 / total) + (int)(position * 100.0d / total) } @Override diff --git a/core/src/main/groovy/com/muwire/core/upload/HashListUploader.groovy b/core/src/main/groovy/com/muwire/core/upload/HashListUploader.groovy index e344a29a..9fbb624f 100644 --- a/core/src/main/groovy/com/muwire/core/upload/HashListUploader.groovy +++ b/core/src/main/groovy/com/muwire/core/upload/HashListUploader.groovy @@ -45,7 +45,7 @@ class HashListUploader extends Uploader { @Override public synchronized int getProgress() { - (int)(mapped.position() * 100.0 / mapped.capacity()) + (int)(mapped.position() * 100.0d / mapped.capacity()) } @Override diff --git a/core/src/main/groovy/com/muwire/core/upload/Uploader.groovy b/core/src/main/groovy/com/muwire/core/upload/Uploader.groovy index 559aaa44..8d9ba3cf 100644 --- a/core/src/main/groovy/com/muwire/core/upload/Uploader.groovy +++ b/core/src/main/groovy/com/muwire/core/upload/Uploader.groovy @@ -49,7 +49,7 @@ abstract class Uploader { final long now = System.currentTimeMillis() long interval = Math.max(1000, now - lastSpeedRead) lastSpeedRead = now; - int currSpeed = (int) (dataSinceLastRead * 1000.0 / interval) + int currSpeed = (int) (dataSinceLastRead * 1000.0d / interval) dataSinceLastRead = 0 // normalize to speedArr.size