author | redestad |
Fri, 15 May 2015 16:09:55 +0200 | |
changeset 30640 | 3dba338b5d00 |
parent 30531 | 4915246064b2 |
child 30641 | 701f6f90dc0b |
jdk/src/java.base/share/classes/java/lang/String.java | file | annotate | diff | comparison | revisions |
--- 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; }