Merge "Throw IOException when dict header cannot be read."

main
Keisuke Kuroyanagi 2014-02-20 09:33:08 +00:00 committed by Android (Google) Code Review
commit d10e2d85af
1 changed files with 4 additions and 0 deletions

View File

@ -53,6 +53,10 @@ public class Ver4DictDecoder extends AbstractDictDecoder {
@Override
public DictionaryHeader readHeader() throws IOException, UnsupportedFormatException {
final DictionaryHeader header = mBinaryDictionary.getHeader();
if (header == null) {
throw new IOException("Cannot read the dictionary header.");
}
return mBinaryDictionary.getHeader();
}