# HG changeset patch # User redestad # Date 1431698995 -7200 # Node ID 3dba338b5d00c5f61eae8945c11cbb26a80b94af # Parent 4915246064b2f89d5f00c96e758686b7fdad36a6 8061254: SPECjvm2008-XML performance regressions in 9-b33 Reviewed-by: alanb, shade diff -r 4915246064b2 -r 3dba338b5d00 jdk/src/java.base/share/classes/java/lang/String.java --- a/jdk/src/java.base/share/classes/java/lang/String.java Wed Jul 05 20:33:55 2017 +0200 +++ b/jdk/src/java.base/share/classes/java/lang/String.java Fri May 15 16:09:55 2015 +0200 @@ -1473,7 +1473,9 @@ for (char v : value) { h = 31 * h + v; } - hash = h; + if (h != 0) { + hash = h; + } } return h; }