mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8221836: Avoid recalculating String.hash when zero
Co-authored-by: Peter Levart <peter.levart@gmail.com> Reviewed-by: jrose, adinn
This commit is contained in:
parent
d40aa622cf
commit
89a267ca46
6 changed files with 66 additions and 40 deletions
|
@ -761,8 +761,6 @@ struct CopyToArchive : StackObj {
|
|||
return true;
|
||||
}
|
||||
unsigned int hash = java_lang_String::hash_code(s);
|
||||
|
||||
java_lang_String::set_hash(s, hash);
|
||||
oop new_s = StringTable::create_archived_string(s, Thread::current());
|
||||
if (new_s == NULL) {
|
||||
return true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue