src/share/classes/java/util/Vector.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
@@ -662,11 +662,12 @@
* reference to a clone of the internal data array, not a reference
* to the original internal data array of this {@code Vector} object.
*
* @return a clone of this vector
*/
- public synchronized Object clone() {
+ @Override
+ public synchronized Vector<E> clone() {
try {
@SuppressWarnings("unchecked")
Vector<E> v = (Vector<E>) super.clone();
v.elementData = Arrays.copyOf(elementData, elementCount);
v.modCount = 0;