< prev index next >

src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp

Print this page
*** 22,10 ***
--- 22,11 ---
   *
   */
  
  #include "precompiled.hpp"
  #include "classfile/symbolTable.hpp"
+ #include "classfile/vmClasses.hpp"
  #include "interpreter/bytecodeStream.hpp"
  #include "memory/universe.hpp"
  #include "oops/fieldStreams.inline.hpp"
  #include "oops/recordComponent.hpp"
  #include "prims/jvmtiClassFileReconstituter.hpp"

*** 893,15 ***
  
    // JVMSpec|           u2 interfaces_count;
    // JVMSpec|           u2 interfaces[interfaces_count];
    Array<InstanceKlass*>* interfaces =  ik()->local_interfaces();
    int num_interfaces = interfaces->length();
!   write_u2(num_interfaces);
    for (int index = 0; index < num_interfaces; index++) {
      HandleMark hm(thread());
      InstanceKlass* iik = interfaces->at(index);
!     write_u2(class_symbol_to_cpool_index(iik->name()));
    }
  
    // JVMSpec|           u2 fields_count;
    // JVMSpec|           field_info fields[fields_count];
    write_field_infos();
--- 894,20 ---
  
    // JVMSpec|           u2 interfaces_count;
    // JVMSpec|           u2 interfaces[interfaces_count];
    Array<InstanceKlass*>* interfaces =  ik()->local_interfaces();
    int num_interfaces = interfaces->length();
!   write_u2(num_interfaces -
+            (ik()->has_injected_identityObject() || ik()->has_injected_primitiveObject() ? 1 : 0));
+ 
    for (int index = 0; index < num_interfaces; index++) {
      HandleMark hm(thread());
      InstanceKlass* iik = interfaces->at(index);
!     if ( (!ik()->has_injected_identityObject() || iik != vmClasses::IdentityObject_klass()) &&
+          (!ik()->has_injected_primitiveObject() || iik != vmClasses::PrimitiveObject_klass())) {
+       write_u2(class_symbol_to_cpool_index(iik->name()));
+     }
    }
  
    // JVMSpec|           u2 fields_count;
    // JVMSpec|           field_info fields[fields_count];
    write_field_infos();
< prev index next >