aboutsummaryrefslogtreecommitdiffstats
path: root/java/src
diff options
context:
space:
mode:
authorKurt Partridge <kep@google.com>2013-02-27 14:13:29 -0800
committerKurt Partridge <kep@google.com>2013-03-07 17:43:35 -0800
commitbba39b9b678f4fb00511ba88c12eef9082ecc628 (patch)
treebe7fd4601971954054ee1d420dabec4ad3d930db /java/src
parentee3261ff558ee734e15af5424f98bb8d8776795f (diff)
downloadlatinime-bba39b9b678f4fb00511ba88c12eef9082ecc628.tar.gz
latinime-bba39b9b678f4fb00511ba88c12eef9082ecc628.tar.xz
latinime-bba39b9b678f4fb00511ba88c12eef9082ecc628.zip
[FileEncap8] Remove useless "success" variable
Change-Id: Icf76bc0b795b6a9221d9a6d61c38df31af54ab7b
Diffstat (limited to 'java/src')
-rw-r--r--java/src/com/android/inputmethod/research/Uploader.java16
1 files changed, 3 insertions, 13 deletions
diff --git a/java/src/com/android/inputmethod/research/Uploader.java b/java/src/com/android/inputmethod/research/Uploader.java
index ac64076cb..df495a88d 100644
--- a/java/src/com/android/inputmethod/research/Uploader.java
+++ b/java/src/com/android/inputmethod/research/Uploader.java
@@ -116,23 +116,15 @@ public final class Uploader {
&& !pathname.canWrite();
}
});
- // TODO: Remove local variable
- boolean success = true;
- if (files.length == 0) {
- success = false;
- }
for (final File file : files) {
- if (!uploadFile(file)) {
- success = false;
- }
+ uploadFile(file);
}
}
- private boolean uploadFile(final File file) {
+ private void uploadFile(final File file) {
if (DEBUG) {
Log.d(TAG, "attempting upload of " + file.getAbsolutePath());
}
- boolean success = false;
final int contentLength = (int) file.length();
HttpURLConnection connection = null;
InputStream fileInputStream = null;
@@ -154,10 +146,9 @@ public final class Uploader {
Log.d(TAG, "| " + reader.readLine());
}
reader.close();
- return success;
+ return;
}
file.delete();
- success = true;
if (DEBUG) {
Log.d(TAG, "upload successful");
}
@@ -175,7 +166,6 @@ public final class Uploader {
connection.disconnect();
}
}
- return success;
}
private static void uploadContents(final InputStream is, final OutputStream os)