diff options
author | 2016-03-04 00:03:44 +0000 | |
---|---|---|
committer | 2016-03-04 00:03:44 +0000 | |
commit | 67ab868b93a29de340269426348dcb116e9d8d11 (patch) | |
tree | 318865ecd25b968f798b00b6feeed268de806b2c /java | |
parent | bd11b82b04538d653223c97c5d151377a93eee81 (diff) | |
parent | e1a9d7ae6715fba1da71d536013e48b9b7e6f9f0 (diff) | |
download | latinime-67ab868b93a29de340269426348dcb116e9d8d11.tar.gz latinime-67ab868b93a29de340269426348dcb116e9d8d11.tar.xz latinime-67ab868b93a29de340269426348dcb116e9d8d11.zip |
Revert "Close FileChannels in UpdateHandler#copyFile." am: 4b46e71163
am: e1a9d7ae67
* commit 'e1a9d7ae6715fba1da71d536013e48b9b7e6f9f0':
Revert "Close FileChannels in UpdateHandler#copyFile."
Diffstat (limited to 'java')
-rw-r--r-- | java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java index 6b32c684f..0517bc814 100644 --- a/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java +++ b/java/src/com/android/inputmethod/dictionarypack/UpdateHandler.java @@ -689,16 +689,8 @@ public final class UpdateHandler { } else { try { final FileChannel sourceChannel = ((FileInputStream) in).getChannel(); - try { - final FileChannel destinationChannel = ((FileOutputStream) out).getChannel(); - try { - sourceChannel.transferTo(0, Integer.MAX_VALUE, destinationChannel); - } finally { - destinationChannel.close(); - } - } finally { - sourceChannel.close(); - } + final FileChannel destinationChannel = ((FileOutputStream) out).getChannel(); + sourceChannel.transferTo(0, Integer.MAX_VALUE, destinationChannel); } catch (IOException e) { // Can't work with channels, or something went wrong. Copy by hand. DebugLogUtils.l("Won't work"); |