From 504017e6ddcf9698f97a42eca627898626597480 Mon Sep 17 00:00:00 2001 From: Keisuke Kuroyanagi Date: Mon, 22 Sep 2014 17:11:26 +0900 Subject: [PATCH] Quit using try catch in addAndWriteRandomWords. Change-Id: I1f3137bacf02bf6bad03a9a99fa56346ff0cd763 --- .../personalization/UserHistoryDictionaryTests.java | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java index 62f106110..f3027eb6c 100644 --- a/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java +++ b/tests/src/com/android/inputmethod/latin/personalization/UserHistoryDictionaryTests.java @@ -213,13 +213,9 @@ public class UserHistoryDictionaryTests extends AndroidTestCase { final int numberOfWords = 1000; final Random random = new Random(123456); - - try { - clearHistory(dict); - addAndWriteRandomWords(dict, numberOfWords, random, true /* checksContents */); - } finally { - checkExistenceAndRemoveDictFile(dict, dictFile); - } + clearHistory(dict); + addAndWriteRandomWords(dict, numberOfWords, random, true /* checksContents */); + checkExistenceAndRemoveDictFile(dict, dictFile); } public void testStressTestForSwitchingLanguagesAndAddingWords() {