File tree Expand file tree Collapse file tree 3 files changed +10
-5
lines changed
spring-core/src/main/java/org/springframework/asm Expand file tree Collapse file tree 3 files changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -193,12 +193,16 @@ public ClassReader(
193193 final byte [] classFileBuffer , final int classFileOffset , final boolean checkClassVersion ) {
194194 this .classFileBuffer = classFileBuffer ;
195195 this .b = classFileBuffer ;
196+
196197 // Check the class' major_version. This field is after the magic and minor_version fields, which
197198 // use 4 and 2 bytes respectively.
198- if (checkClassVersion && readShort (classFileOffset + 6 ) > Opcodes .V25 ) {
199- throw new IllegalArgumentException (
200- "Unsupported class file major version " + readShort (classFileOffset + 6 ));
201- }
199+ // SPRING PATCH: leniently try to parse newer class files as well
200+ // if (checkClassVersion && readShort(classFileOffset + 6) > Opcodes.V26) {
201+ // throw new IllegalArgumentException(
202+ // "Unsupported class file major version " + readShort(classFileOffset + 6));
203+ // }
204+ // END OF PATCH
205+
202206 // Create the constant pool arrays. The constant_pool_count field is after the magic,
203207 // minor_version and major_version fields, which use 4, 2 and 2 bytes respectively.
204208 int constantPoolCount = readUnsignedShort (classFileOffset + 8 );
Original file line number Diff line number Diff line change @@ -290,6 +290,7 @@ public interface Opcodes {
290290 int V23 = 0 << 16 | 67 ;
291291 int V24 = 0 << 16 | 68 ;
292292 int V25 = 0 << 16 | 69 ;
293+ int V26 = 0 << 16 | 70 ;
293294
294295 /**
295296 * Version flag indicating that the class is using 'preview' features.
Original file line number Diff line number Diff line change @@ -1473,7 +1473,7 @@ private static final class LabelEntry {
14731473
14741474 /**
14751475 * Another entry (and so on recursively) having the same hash code (modulo the size of {@link
1476- * SymbolTable#labelEntries}} ) as this one.
1476+ * SymbolTable#labelEntries}) as this one.
14771477 */
14781478 LabelEntry next ;
14791479
You can’t perform that action at this time.
0 commit comments