< prev index next >

src/hotspot/share/classfile/classFileParser.cpp

Print this page

        

@@ -3550,16 +3550,16 @@
     } else {
       // Unknown attribute
       cfs->skip_u1(attribute_length, CHECK);
     }
   }
-  _annotations = assemble_annotations(runtime_visible_annotations,
+  _class_annotations = assemble_annotations(runtime_visible_annotations,
                                       runtime_visible_annotations_length,
                                       runtime_invisible_annotations,
                                       runtime_invisible_annotations_length,
                                       CHECK);
-  _type_annotations = assemble_annotations(runtime_visible_type_annotations,
+  _class_type_annotations = assemble_annotations(runtime_visible_type_annotations,
                                            runtime_visible_type_annotations_length,
                                            runtime_invisible_type_annotations,
                                            runtime_invisible_type_annotations_length,
                                            CHECK);
 

@@ -3613,32 +3613,32 @@
 }
 
 // Create the Annotations object that will
 // hold the annotations array for the Klass.
 void ClassFileParser::create_combined_annotations(TRAPS) {
-    if (_annotations == NULL &&
-        _type_annotations == NULL &&
+    if (_class_annotations == NULL &&
+        _class_type_annotations == NULL &&
         _fields_annotations == NULL &&
         _fields_type_annotations == NULL) {
       // Don't create the Annotations object unnecessarily.
       return;
     }
 
     Annotations* const annotations = Annotations::allocate(_loader_data, CHECK);
-    annotations->set_class_annotations(_annotations);
-    annotations->set_class_type_annotations(_type_annotations);
+    annotations->set_class_annotations(_class_annotations);
+    annotations->set_class_type_annotations(_class_type_annotations);
     annotations->set_fields_annotations(_fields_annotations);
     annotations->set_fields_type_annotations(_fields_type_annotations);
 
     // This is the Annotations object that will be
     // assigned to InstanceKlass being constructed.
     _combined_annotations = annotations;
 
     // The annotations arrays below has been transfered the
     // _combined_annotations so these fields can now be cleared.
-    _annotations             = NULL;
-    _type_annotations        = NULL;
+    _class_annotations       = NULL;
+    _class_type_annotations  = NULL;
     _fields_annotations      = NULL;
     _fields_type_annotations = NULL;
 }
 
 // Transfer ownership of metadata allocated to the InstanceKlass.

@@ -5788,12 +5788,12 @@
   _nest_members(NULL),
   _nest_host(0),
   _local_interfaces(NULL),
   _transitive_interfaces(NULL),
   _combined_annotations(NULL),
-  _annotations(NULL),
-  _type_annotations(NULL),
+  _class_annotations(NULL),
+  _class_type_annotations(NULL),
   _fields_annotations(NULL),
   _fields_type_annotations(NULL),
   _klass(NULL),
   _klass_to_deallocate(NULL),
   _parsed_annotations(NULL),

@@ -5893,11 +5893,11 @@
   _methods = NULL;
   _inner_classes = NULL;
   _nest_members = NULL;
   _local_interfaces = NULL;
   _combined_annotations = NULL;
-  _annotations = _type_annotations = NULL;
+  _class_annotations = _class_type_annotations = NULL;
   _fields_annotations = _fields_type_annotations = NULL;
 }
 
 // Destructor to clean up
 ClassFileParser::~ClassFileParser() {

@@ -5935,19 +5935,19 @@
     // Deallocate the Annotations object and the installed annotations arrays.
     _combined_annotations->deallocate_contents(_loader_data);
 
     // If the _combined_annotations pointer is non-NULL,
     // then the other annotations fields should have been cleared.
-    assert(_annotations             == NULL, "Should have been cleared");
-    assert(_type_annotations        == NULL, "Should have been cleared");
+    assert(_class_annotations       == NULL, "Should have been cleared");
+    assert(_class_type_annotations  == NULL, "Should have been cleared");
     assert(_fields_annotations      == NULL, "Should have been cleared");
     assert(_fields_type_annotations == NULL, "Should have been cleared");
   } else {
     // If the annotations arrays were not installed into the Annotations object,
     // then they have to be deallocated explicitly.
-    MetadataFactory::free_array<u1>(_loader_data, _annotations);
-    MetadataFactory::free_array<u1>(_loader_data, _type_annotations);
+    MetadataFactory::free_array<u1>(_loader_data, _class_annotations);
+    MetadataFactory::free_array<u1>(_loader_data, _class_type_annotations);
     Annotations::free_contents(_loader_data, _fields_annotations);
     Annotations::free_contents(_loader_data, _fields_type_annotations);
   }
 
   clear_class_metadata();
< prev index next >