hotspot/src/share/vm/classfile/classFileParser.cpp
changeset 15221 83925f427779
parent 15195 6313e53c38a1
parent 15217 af9400e71d87
child 15244 83447fffce1e
equal deleted inserted replaced
15213:8048da69db1f 15221:83925f427779
  2501       if (is_interface && !method->is_abstract() && !method->is_static()) {
  2501       if (is_interface && !method->is_abstract() && !method->is_static()) {
  2502         // default method
  2502         // default method
  2503         *has_default_methods = true;
  2503         *has_default_methods = true;
  2504       }
  2504       }
  2505       methods->at_put(index, method());
  2505       methods->at_put(index, method());
  2506       if (*methods_annotations == NULL) {
  2506 
  2507         *methods_annotations =
  2507       if (method_annotations != NULL) {
  2508              MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL);
  2508         if (*methods_annotations == NULL) {
  2509       }
  2509           *methods_annotations =
  2510       (*methods_annotations)->at_put(index, method_annotations);
  2510               MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL);
  2511       if (*methods_parameter_annotations == NULL) {
  2511         }
  2512         *methods_parameter_annotations =
  2512         (*methods_annotations)->at_put(index, method_annotations);
  2513             MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL);
  2513       }
  2514       }
  2514 
  2515       (*methods_parameter_annotations)->at_put(index, method_parameter_annotations);
  2515       if (method_parameter_annotations != NULL) {
  2516       if (*methods_default_annotations == NULL) {
  2516         if (*methods_parameter_annotations == NULL) {
  2517         *methods_default_annotations =
  2517           *methods_parameter_annotations =
  2518             MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL);
  2518               MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL);
  2519       }
  2519         }
  2520       (*methods_default_annotations)->at_put(index, method_default_annotations);
  2520         (*methods_parameter_annotations)->at_put(index, method_parameter_annotations);
  2521       if (*methods_type_annotations == NULL) {
  2521       }
  2522         *methods_type_annotations =
  2522 
  2523              MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL);
  2523       if (method_default_annotations != NULL) {
  2524       }
  2524         if (*methods_default_annotations == NULL) {
  2525       (*methods_type_annotations)->at_put(index, method_type_annotations);
  2525           *methods_default_annotations =
       
  2526               MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL);
       
  2527         }
       
  2528         (*methods_default_annotations)->at_put(index, method_default_annotations);
       
  2529       }
       
  2530 
       
  2531       if (method_type_annotations != NULL) {
       
  2532         if (*methods_type_annotations == NULL) {
       
  2533           *methods_type_annotations =
       
  2534               MetadataFactory::new_array<AnnotationArray*>(loader_data, length, NULL, CHECK_NULL);
       
  2535         }
       
  2536         (*methods_type_annotations)->at_put(index, method_type_annotations);
       
  2537       }
  2526     }
  2538     }
  2527 
  2539 
  2528     if (_need_verify && length > 1) {
  2540     if (_need_verify && length > 1) {
  2529       // Check duplicated methods
  2541       // Check duplicated methods
  2530       ResourceMark rm(THREAD);
  2542       ResourceMark rm(THREAD);
  3336                                           CHECK_(nullHandle));
  3348                                           CHECK_(nullHandle));
  3337     // Methods
  3349     // Methods
  3338     bool has_final_method = false;
  3350     bool has_final_method = false;
  3339     AccessFlags promoted_flags;
  3351     AccessFlags promoted_flags;
  3340     promoted_flags.set_flags(0);
  3352     promoted_flags.set_flags(0);
  3341     // These need to be oop pointers because they are allocated lazily
  3353 
  3342     // inside parse_methods inside a nested HandleMark
       
  3343     Array<AnnotationArray*>* methods_annotations = NULL;
  3354     Array<AnnotationArray*>* methods_annotations = NULL;
  3344     Array<AnnotationArray*>* methods_parameter_annotations = NULL;
  3355     Array<AnnotationArray*>* methods_parameter_annotations = NULL;
  3345     Array<AnnotationArray*>* methods_default_annotations = NULL;
  3356     Array<AnnotationArray*>* methods_default_annotations = NULL;
  3346     Array<AnnotationArray*>* methods_type_annotations = NULL;
  3357     Array<AnnotationArray*>* methods_type_annotations = NULL;
  3347     Array<Method*>* methods = parse_methods(loader_data,
  3358     Array<Method*>* methods = parse_methods(loader_data,