Throw IOException when dict header cannot be read.

Bug: 13106638
Change-Id: Ib48ef0a191a436552c49b6e817dfa13fe1567ae8
This commit is contained in:
Keisuke Kuroyanagi 2014-02-20 18:11:17 +09:00
parent bb17354041
commit afd9b62f00

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();
}