1 |
|
/* |
2 |
< |
* Copyright (c) 2001, Oracle and/or its affiliates. All rights reserved. |
2 |
> |
* Copyright (c) 2001, 2012, Oracle and/or its affiliates. All rights reserved. |
3 |
|
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 |
|
* |
5 |
|
* This code is free software; you can redistribute it and/or modify it |
36 |
|
if (m.hashCode() != 0) |
37 |
|
throw new Exception("Empty Hashtable has nonzero hashCode."); |
38 |
|
|
39 |
– |
m.put("Joe", "Blow"); |
40 |
– |
if (m.hashCode() != ("Joe".hashCode() ^ "Blow".hashCode())) |
41 |
– |
throw new Exception("Non-empty Hashtable has wrong hashCode."); |
39 |
|
} |
40 |
|
} |