7159772: instanceKlass::all_fields_count() returns incorrect total field count

Fix instanceKlass::all_fields_count() bug.

Reviewed-by: kvn, never
This commit is contained in:
Jiangli Zhou 2012-04-10 09:31:04 -07:00 committed by Jiangli Zhou
parent 023ad06e46
commit 4fd64312c8

View File

@ -337,7 +337,7 @@ class instanceKlass: public Klass {
int java_fields_count() const { return (int)_java_fields_count; } int java_fields_count() const { return (int)_java_fields_count; }
// Number of fields including any injected fields // Number of fields including any injected fields
int all_fields_count() const { return _fields->length() / sizeof(FieldInfo::field_slots); } int all_fields_count() const { return _fields->length() / FieldInfo::field_slots; }
typeArrayOop fields() const { return _fields; } typeArrayOop fields() const { return _fields; }