summaryrefslogtreecommitdiff
path: root/src/de/danoeh/antennapod/service
diff options
context:
space:
mode:
authorAndrew Gaul <andrew@gaul.org>2013-07-13 18:44:37 -0700
committerAndrew Gaul <andrew@gaul.org>2013-07-14 22:13:49 -0700
commitb1cdfe20416dc78349dc78b279f718076e07643c (patch)
tree5d28c589a1c3cb8f5685fa4439ad2b1d72a4ecb4 /src/de/danoeh/antennapod/service
parent941fa9062e2ac1709e8c99208e2f63226fe2c7a8 (diff)
downloadAntennaPod-b1cdfe20416dc78349dc78b279f718076e07643c.zip
Address FindBugs warnings
This commit fixes 36 of the 109 warnings.
Diffstat (limited to 'src/de/danoeh/antennapod/service')
-rw-r--r--src/de/danoeh/antennapod/service/download/HttpDownloader.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/de/danoeh/antennapod/service/download/HttpDownloader.java b/src/de/danoeh/antennapod/service/download/HttpDownloader.java
index 0cb89368d..b69c3c446 100644
--- a/src/de/danoeh/antennapod/service/download/HttpDownloader.java
+++ b/src/de/danoeh/antennapod/service/download/HttpDownloader.java
@@ -79,9 +79,8 @@ public class HttpDownloader extends Downloader {
File destination = new File(status.getFeedFile()
.getFile_url());
if (!destination.exists()) {
- connection = AndroidHttpClient
- .getUngzippedContent(httpEntity);
- InputStream in = new BufferedInputStream(connection);
+ connection = new BufferedInputStream(AndroidHttpClient
+ .getUngzippedContent(httpEntity));
out = new BufferedOutputStream(new FileOutputStream(
destination));
byte[] buffer = new byte[BUFFER_SIZE];
@@ -104,7 +103,7 @@ public class HttpDownloader extends Downloader {
if (AppConfig.DEBUG)
Log.d(TAG, "Starting download");
while (!cancelled
- && (count = in.read(buffer)) != -1) {
+ && (count = connection.read(buffer)) != -1) {
out.write(buffer, 0, count);
status.setSoFar(status.getSoFar() + count);
status.setProgressPercent((int) (((double) status