2473 if (is_interface && !method->is_abstract() && !method->is_static()) { |
2473 if (is_interface && !method->is_abstract() && !method->is_static()) { |
2474 // default method |
2474 // default method |
2475 *has_default_methods = true; |
2475 *has_default_methods = true; |
2476 } |
2476 } |
2477 methods->at_put(index, method()); |
2477 methods->at_put(index, method()); |
2478 if (*methods_annotations == NULL) { |
2478 |
2479 *methods_annotations = |
2479 if (method_annotations != NULL) { |
2480 MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL); |
2480 if (*methods_annotations == NULL) { |
2481 } |
2481 *methods_annotations = |
2482 (*methods_annotations)->at_put(index, method_annotations); |
2482 MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL); |
2483 if (*methods_parameter_annotations == NULL) { |
2483 } |
2484 *methods_parameter_annotations = |
2484 (*methods_annotations)->at_put(index, method_annotations); |
2485 MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL); |
2485 } |
2486 } |
2486 |
2487 (*methods_parameter_annotations)->at_put(index, method_parameter_annotations); |
2487 if (method_parameter_annotations != NULL) { |
2488 if (*methods_default_annotations == NULL) { |
2488 if (*methods_parameter_annotations == NULL) { |
2489 *methods_default_annotations = |
2489 *methods_parameter_annotations = |
2490 MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL); |
2490 MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL); |
2491 } |
2491 } |
2492 (*methods_default_annotations)->at_put(index, method_default_annotations); |
2492 (*methods_parameter_annotations)->at_put(index, method_parameter_annotations); |
2493 if (*methods_type_annotations == NULL) { |
2493 } |
2494 *methods_type_annotations = |
2494 |
2495 MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL); |
2495 if (method_default_annotations != NULL) { |
2496 } |
2496 if (*methods_default_annotations == NULL) { |
2497 (*methods_type_annotations)->at_put(index, method_type_annotations); |
2497 *methods_default_annotations = |
|
2498 MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL); |
|
2499 } |
|
2500 (*methods_default_annotations)->at_put(index, method_default_annotations); |
|
2501 } |
|
2502 |
|
2503 if (method_type_annotations != NULL) { |
|
2504 if (*methods_type_annotations == NULL) { |
|
2505 *methods_type_annotations = |
|
2506 MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL); |
|
2507 } |
|
2508 (*methods_type_annotations)->at_put(index, method_type_annotations); |
|
2509 } |
2498 } |
2510 } |
2499 |
2511 |
2500 if (_need_verify && length > 1) { |
2512 if (_need_verify && length > 1) { |
2501 // Check duplicated methods |
2513 // Check duplicated methods |
2502 ResourceMark rm(THREAD); |
2514 ResourceMark rm(THREAD); |
3307 CHECK_(nullHandle)); |
3319 CHECK_(nullHandle)); |
3308 // Methods |
3320 // Methods |
3309 bool has_final_method = false; |
3321 bool has_final_method = false; |
3310 AccessFlags promoted_flags; |
3322 AccessFlags promoted_flags; |
3311 promoted_flags.set_flags(0); |
3323 promoted_flags.set_flags(0); |
3312 // These need to be oop pointers because they are allocated lazily |
3324 |
3313 // inside parse_methods inside a nested HandleMark |
|
3314 Array<AnnotationArray*>* methods_annotations = NULL; |
3325 Array<AnnotationArray*>* methods_annotations = NULL; |
3315 Array<AnnotationArray*>* methods_parameter_annotations = NULL; |
3326 Array<AnnotationArray*>* methods_parameter_annotations = NULL; |
3316 Array<AnnotationArray*>* methods_default_annotations = NULL; |
3327 Array<AnnotationArray*>* methods_default_annotations = NULL; |
3317 Array<AnnotationArray*>* methods_type_annotations = NULL; |
3328 Array<AnnotationArray*>* methods_type_annotations = NULL; |
3318 Array<Method*>* methods = parse_methods(loader_data, |
3329 Array<Method*>* methods = parse_methods(loader_data, |