Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03105290 authored by Keisuke Kuroyanagi's avatar Keisuke Kuroyanagi Committed by Android (Google) Code Review
Browse files

Merge "Throw exception when the header cannot be read."

parents 776bba09 97a40d03
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -173,6 +173,9 @@ public class Ver2DictDecoder 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.");
        }
        if (header.mFormatOptions.mVersion != FormatSpec.VERSION2) {
            throw new UnsupportedFormatException("File header has a wrong version : "
                    + header.mFormatOptions.mVersion);