< prev index next >
src/jdk.internal.vm.compiler/share/classes/org.graalvm.graphio/src/org/graalvm/graphio/GraphProtocol.java
Print this page
@@ -73,20 +73,23 @@
private static final int KLASS = 0x00;
private static final int ENUM_KLASS = 0x01;
private static final byte[] MAGIC_BYTES = {'B', 'I', 'G', 'V'};
+ private static final int MAJOR_VERSION = 6;
+ private static final int MINOR_VERSION = 1;
+
private final ConstantPool constantPool;
private final ByteBuffer buffer;
private final WritableByteChannel channel;
private final boolean embedded;
final int versionMajor;
final int versionMinor;
private boolean printing;
GraphProtocol(WritableByteChannel channel, int major, int minor, boolean embedded) throws IOException {
- if (major > 6 || (major == 6 && minor > 0)) {
+ if (major > MAJOR_VERSION || (major == MAJOR_VERSION && minor > MINOR_VERSION)) {
throw new IllegalArgumentException("Unrecognized version " + major + "." + minor);
}
this.versionMajor = major;
this.versionMinor = minor;
this.constantPool = new ConstantPool();
< prev index next >