ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/test/jtreg/util/Hashtable/HashCode.java
(Generate patch)

Comparing jsr166/src/test/jtreg/util/Hashtable/HashCode.java (file contents):
Revision 1.2 by jsr166, Sun Sep 5 21:32:19 2010 UTC vs.
Revision 1.3 by jsr166, Tue Sep 15 06:59:16 2015 UTC

# Line 1 | Line 1
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
# Line 36 | Line 36 | public class HashCode {
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   }

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines