From bc89f5d3a5a2771b56643e1b9c47744268fff3a6 Mon Sep 17 00:00:00 2001 From: Jean Chalard Date: Wed, 21 Mar 2012 17:28:37 +0900 Subject: [PATCH] Correctly close the gzip stream I had gotten the chain call in reverse. Bug: 6177523 Change-Id: Ic5b76425de2d5d05d5132f8d2c7ade0d79c14ccc --- .../android/inputmethod/latin/BinaryDictionaryFileDumper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java index 9ffc7d0a2..8ec440500 100644 --- a/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java +++ b/java/src/com/android/inputmethod/latin/BinaryDictionaryFileDumper.java @@ -196,8 +196,8 @@ public class BinaryDictionaryFileDumper { } finally { // Ignore exceptions while closing files. try { - // afd.close() will close inputStream, we should not call inputStream.close(). - if (null != afd) afd.close(); + // inputStream.close() will close afd, we should not call afd.close(). + if (null != inputStream) inputStream.close(); } catch (Exception e) { Log.e(TAG, "Exception while closing a cross-process file descriptor : " + e); }