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

Commit bc435b78 authored by Ken Wakasa's avatar Ken Wakasa Committed by Android Git Automerger
Browse files

am 40e91e45: Merge "Check the version of format options before writing."

* commit '40e91e45':
  Check the version of format options before writing.
parents a01e18d5 40e91e45
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -68,6 +68,12 @@ public class Ver3DictEncoder implements DictEncoder {
    @Override
    public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions)
            throws IOException, UnsupportedFormatException {
        if (formatOptions.mVersion > 3) {
            throw new UnsupportedFormatException(
                    "The given format options has wrong version number : "
                    + formatOptions.mVersion);
        }

        if (mOutStream == null) {
            openStream();
        }