src/share/classes/java/util/Hashtable.java

Print this page

        

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1994, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1994, 2012, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.  Oracle designates this

@@ -520,11 +520,12 @@
      * hashtable itself is copied, but the keys and values are not cloned.
      * This is a relatively expensive operation.
      *
      * @return  a clone of the hashtable
      */
-    public synchronized Object clone() {
+    @Override
+    public synchronized Hashtable<K,V> clone() {
         try {
             Hashtable<K,V> t = (Hashtable<K,V>) super.clone();
             t.table = new Entry[table.length];
             for (int i = table.length ; i-- > 0 ; ) {
                 t.table[i] = (table[i] != null)