test/java/util/Hashtable/HashCode.java

Print this page
rev 5431 : 7126277: Alternative hashing implementation

*** 34,43 **** public static void main(String[] args) throws Exception { Map m = new Hashtable(); if (m.hashCode() != 0) throw new Exception("Empty Hashtable has nonzero hashCode."); - m.put("Joe", "Blow"); - if (m.hashCode() != ("Joe".hashCode() ^ "Blow".hashCode())) - throw new Exception("Non-empty Hashtable has wrong hashCode."); } } --- 34,40 ----