@@ -2448,17 +2448,10 @@ Method* ClassFileParser::parse_method(const ClassFileStream* const cfs,
2448
2448
parsed_code_attribute = true ;
2449
2449
2450
2450
// Stack size, locals size, and code size
2451
- if (_major_version == 45 && _minor_version <= 2 ) {
2452
- cfs->guarantee_more (4 , CHECK_NULL);
2453
- max_stack = cfs->get_u1_fast ();
2454
- max_locals = cfs->get_u1_fast ();
2455
- code_length = cfs->get_u2_fast ();
2456
- } else {
2457
- cfs->guarantee_more (8 , CHECK_NULL);
2458
- max_stack = cfs->get_u2_fast ();
2459
- max_locals = cfs->get_u2_fast ();
2460
- code_length = cfs->get_u4_fast ();
2461
- }
2451
+ cfs->guarantee_more (8 , CHECK_NULL);
2452
+ max_stack = cfs->get_u2_fast ();
2453
+ max_locals = cfs->get_u2_fast ();
2454
+ code_length = cfs->get_u4_fast ();
2462
2455
if (_need_verify) {
2463
2456
guarantee_property (args_size <= max_locals,
2464
2457
" Arguments can't fit into locals in class file %s" ,
@@ -2489,13 +2482,8 @@ Method* ClassFileParser::parse_method(const ClassFileStream* const cfs,
2489
2482
2490
2483
unsigned int calculated_attribute_length = 0 ;
2491
2484
2492
- if (_major_version > 45 || (_major_version == 45 && _minor_version > 2 )) {
2493
- calculated_attribute_length =
2494
- sizeof (max_stack) + sizeof (max_locals) + sizeof (code_length);
2495
- } else {
2496
- // max_stack, locals and length are smaller in pre-version 45.2 classes
2497
- calculated_attribute_length = sizeof (u1) + sizeof (u1) + sizeof (u2);
2498
- }
2485
+ calculated_attribute_length =
2486
+ sizeof (max_stack) + sizeof (max_locals) + sizeof (code_length);
2499
2487
calculated_attribute_length +=
2500
2488
code_length +
2501
2489
sizeof (exception_table_length) +
0 commit comments