Enforce matching version in Java and C#.

Change-Id: I7f1f12f2f97e5227e0dabc2965ce66a6d41c229c
This commit is contained in:
Wouter van Oortmerssen
2019-05-31 11:29:09 -07:00
parent 3a88e1031b
commit c978b9ef1f
35 changed files with 55 additions and 34 deletions

View File

@@ -39,6 +39,14 @@ public class Constants {
static final int FILE_IDENTIFIER_LENGTH = 4;
/** The number of bytes in a size prefix. */
public static final int SIZE_PREFIX_LENGTH = 4;
/** A version identifier to force a compile error if someone
accidentally tries to build generated code with a runtime of
two mismatched version. Versions need to always match, as
the runtime and generated code are modified in sync.
Changes to the Java implementation need to be sure to change
the version here and in the code generator on every possible
incompatible change */
public static void FLATBUFFERS_1_11_1() {}
}
/// @endcond