< prev index next >
src/jdk.hotspot.agent/share/classes/sun/jvm/hotspot/utilities/Hashtable.java
Print this page
@ rev 51710 : 8204308: SA: serviceability/sa/TestInstanceKlassSize*.java fails when running in CDS mode
| Summary: Use longs instead of ints while computing the identity hash of klass symbols
~ Reviewed-by: coleenp, lfoltan
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2003, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -47,12 +47,12 @@
// derived class may return Class<? extends HashtableEntry>
protected Class getHashtableEntryClass() {
return HashtableEntry.class;
}
- public int computeHash(Symbol name) {
- return (int) name.identityHash();
+ public long computeHash(Symbol name) {
+ return name.identityHash();
}
public int hashToIndex(long fullHash) {
return (int) (fullHash % tableSize());
}
< prev index next >