src/share/vm/memory/dump.cpp

changeset 2700
352622fd140a
parent 2661
b099aaf51bf8
child 2777
8ce625481709
     1.1 --- a/src/share/vm/memory/dump.cpp	Thu Mar 31 02:31:57 2011 -0700
     1.2 +++ b/src/share/vm/memory/dump.cpp	Thu Mar 31 14:00:41 2011 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -80,16 +80,7 @@
    1.11        oop obj = *p;
    1.12        if (obj->klass() == SystemDictionary::String_klass()) {
    1.13  
    1.14 -        int hash;
    1.15 -        typeArrayOop value = java_lang_String::value(obj);
    1.16 -        int length = java_lang_String::length(obj);
    1.17 -        if (length == 0) {
    1.18 -          hash = 0;
    1.19 -        } else {
    1.20 -          int offset = java_lang_String::offset(obj);
    1.21 -          jchar* s = value->char_at_addr(offset);
    1.22 -          hash = StringTable::hash_string(s, length);
    1.23 -        }
    1.24 +        int hash = java_lang_String::hash_string(obj);
    1.25          obj->int_field_put(hash_offset, hash);
    1.26        }
    1.27      }

mercurial