< prev index next >
src/java.base/share/classes/jdk/internal/org/objectweb/asm/ClassReader.java
Print this page
*** 208,218 ****
ClassReader(
final byte[] classFileBuffer, final int classFileOffset, final boolean checkClassVersion) {
b = classFileBuffer;
// Check the class' major_version. This field is after the magic and minor_version fields, which
// use 4 and 2 bytes respectively.
! if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V12) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}
// Create the constant pool arrays. The constant_pool_count field is after the magic,
// minor_version and major_version fields, which use 4, 2 and 2 bytes respectively.
--- 208,218 ----
ClassReader(
final byte[] classFileBuffer, final int classFileOffset, final boolean checkClassVersion) {
b = classFileBuffer;
// Check the class' major_version. This field is after the magic and minor_version fields, which
// use 4 and 2 bytes respectively.
! if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V13) {
throw new IllegalArgumentException(
"Unsupported class file major version " + readShort(classFileOffset + 6));
}
// Create the constant pool arrays. The constant_pool_count field is after the magic,
// minor_version and major_version fields, which use 4, 2 and 2 bytes respectively.
< prev index next >