< prev index next >

src/hotspot/share/prims/jvmtiEnv.cpp

Print this page
*** 2442,11 ***
    int id_index = (result_count - 1);
  
    for (FilteredFieldStream src_st(ik, true, true); !src_st.eos(); src_st.next()) {
      result_list[id_index--] = jfieldIDWorkaround::to_jfieldID(
                                              ik, src_st.offset(),
!                                             src_st.access_flags().is_static());
    }
    assert(id_index == -1, "just checking");
    // Fill in the results
    *field_count_ptr = result_count;
    *fields_ptr = result_list;
--- 2442,12 ---
    int id_index = (result_count - 1);
  
    for (FilteredFieldStream src_st(ik, true, true); !src_st.eos(); src_st.next()) {
      result_list[id_index--] = jfieldIDWorkaround::to_jfieldID(
                                              ik, src_st.offset(),
!                                             src_st.access_flags().is_static(),
+                                             src_st.field_descriptor().is_inlined());
    }
    assert(id_index == -1, "just checking");
    // Fill in the results
    *field_count_ptr = result_count;
    *fields_ptr = result_list;

*** 2479,12 ***
        *interface_count_ptr = 0;
        *interfaces_ptr = (jclass*) jvmtiMalloc(0 * sizeof(jclass));
        return JVMTI_ERROR_NONE;
      }
  
!     Array<InstanceKlass*>* interface_list = InstanceKlass::cast(k)->local_interfaces();
!     const int result_length = (interface_list == NULL ? 0 : interface_list->length());
      jclass* result_list = (jclass*) jvmtiMalloc(result_length * sizeof(jclass));
      for (int i_index = 0; i_index < result_length; i_index += 1) {
        InstanceKlass* klass_at = interface_list->at(i_index);
        assert(klass_at->is_klass(), "interfaces must be Klass*s");
        assert(klass_at->is_interface(), "interfaces must be interfaces");
--- 2480,13 ---
        *interface_count_ptr = 0;
        *interfaces_ptr = (jclass*) jvmtiMalloc(0 * sizeof(jclass));
        return JVMTI_ERROR_NONE;
      }
  
!     InstanceKlass* ik = InstanceKlass::cast(k);
!     Array<InstanceKlass*>* interface_list = ik->local_interfaces();
+     int result_length = (interface_list == NULL ? 0 : interface_list->length());
      jclass* result_list = (jclass*) jvmtiMalloc(result_length * sizeof(jclass));
      for (int i_index = 0; i_index < result_length; i_index += 1) {
        InstanceKlass* klass_at = interface_list->at(i_index);
        assert(klass_at->is_klass(), "interfaces must be Klass*s");
        assert(klass_at->is_interface(), "interfaces must be interfaces");
< prev index next >