mirror of
https://gitlab.futo.org/keyboard/latinime.git
synced 2024-09-28 14:54:30 +01:00
Check the version of format options before writing.
Change-Id: I3951e4395a2da225e240e856c23339b679e6155e
This commit is contained in:
parent
5bf96a8fc1
commit
8a06b26cb4
@ -68,6 +68,12 @@ public class Ver3DictEncoder implements DictEncoder {
|
|||||||
@Override
|
@Override
|
||||||
public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions)
|
public void writeDictionary(final FusionDictionary dict, final FormatOptions formatOptions)
|
||||||
throws IOException, UnsupportedFormatException {
|
throws IOException, UnsupportedFormatException {
|
||||||
|
if (formatOptions.mVersion > 3) {
|
||||||
|
throw new UnsupportedFormatException(
|
||||||
|
"The given format options has wrong version number : "
|
||||||
|
+ formatOptions.mVersion);
|
||||||
|
}
|
||||||
|
|
||||||
if (mOutStream == null) {
|
if (mOutStream == null) {
|
||||||
openStream();
|
openStream();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user