@ -162,7 +162,7 @@ class DelugeRpcClient implements Closeable {
if (!(responseObject instanceof List)) {
throw new DaemonException(ExceptionType.UnexpectedResponse, responseObject.toString());
}
final List response = (List) responseObject;
final List<?> response = (List<?>) responseObject;
if (response.size() < RESPONSE_RETURN_VALUE_INDEX + 1) {
@ -323,7 +323,7 @@ public class SynologyAdapter implements IDaemonAdapter {
long downloaded = transfer.getLong("size_downloaded");
int speed = transfer.getInt("speed_download");
long size = jsonTorrent.getLong("size");
Float eta = Float.valueOf(size - downloaded) / speed;
float eta = (float) (size - downloaded) / speed;
int totalSeeders = 0;
int totalLeechers = 0;
if (additional.has("tracker")) {
@ -349,11 +349,11 @@ public class SynologyAdapter implements IDaemonAdapter {
totalSeeders,
detail.getInt("connected_leechers"),
totalLeechers,
eta.intValue(),
(int) eta,
downloaded,
transfer.getLong("size_uploaded"),
size,
(size == 0) ? 0 : (Float.valueOf(downloaded) / size),
(size == 0) ? 0 : ((float) downloaded / size),
0,
jsonTorrent.getString("title"),
new Date(detail.getLong("create_time") * 1000),
@ -29,8 +29,8 @@ public class SetTransferRatesTask extends DaemonTask {
public static SetTransferRatesTask create(IDaemonAdapter adapter, Integer uploadRate, Integer downloadRate) {
Bundle data = new Bundle();
data.putInt("UPLOAD_RATE", (uploadRate == null ? -1 : uploadRate.intValue()));
data.putInt("UPLOAD_RATE", (uploadRate == null ? -1 : uploadRate));
data.putInt("DOWNLOAD_RATE", (downloadRate == null ? -1 : downloadRate.intValue()));
data.putInt("DOWNLOAD_RATE", (downloadRate == null ? -1 : downloadRate));
return new SetTransferRatesTask(adapter, data);
@ -48,7 +48,7 @@ public class SelfSignedTrustManager implements X509TrustManager {
private static String hexify(byte[] bytes) {
char[] hexDigits = {'0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'};
StringBuffer buf = new StringBuffer(bytes.length * 2);
StringBuilder buf = new StringBuilder(bytes.length * 2);
for (byte aByte : bytes) {
buf.append(hexDigits[(aByte & 0xf0) >> 4]);
buf.append(hexDigits[aByte & 0x0f]);