diff options
author | 2013-12-02 18:15:22 +0900 | |
---|---|---|
committer | 2013-12-02 18:15:22 +0900 | |
commit | 9ab71eda83c756d9d551fc757d07b6b81f6dfb1e (patch) | |
tree | 4e41703a9a869400978b9f266cae1221dc154c15 /java/src/com/android/inputmethod/latin/makedict/FormatSpec.java | |
parent | 6e587b7f178448e24518d169f2aa8bb1a74643b7 (diff) | |
download | latinime-9ab71eda83c756d9d551fc757d07b6b81f6dfb1e.tar.gz latinime-9ab71eda83c756d9d551fc757d07b6b81f6dfb1e.tar.xz latinime-9ab71eda83c756d9d551fc757d07b6b81f6dfb1e.zip |
Fix tests.
This fixes a few bugs that became apparent with the
reinstating of a test.
Bug: 11954718
Change-Id: I1127bc3180f856566429f40d14c944e6f0007e09
Diffstat (limited to 'java/src/com/android/inputmethod/latin/makedict/FormatSpec.java')
-rw-r--r-- | java/src/com/android/inputmethod/latin/makedict/FormatSpec.java | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java index f85431ee8..555c71b4c 100644 --- a/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java +++ b/java/src/com/android/inputmethod/latin/makedict/FormatSpec.java @@ -379,6 +379,15 @@ public final class FormatSpec { mHeaderSize = headerSize; mDictionaryOptions = dictionaryOptions; mFormatOptions = formatOptions; + if (null == getLocaleString()) { + throw new RuntimeException("Cannot create a FileHeader without a locale"); + } + if (null == getVersion()) { + throw new RuntimeException("Cannot create a FileHeader without a version"); + } + if (null == getId()) { + throw new RuntimeException("Cannot create a FileHeader without an ID"); + } } // Helper method to get the locale as a String |