Update old school @exception with new school @throws.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/branches/COLLECTIONS_3_2_X@1747099 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Gary D. Gregory 2016-06-07 00:40:18 +00:00
parent 876942fc66
commit 7f0185bd3d
6 changed files with 24 additions and 24 deletions

View File

@ -664,7 +664,7 @@ public class CursorableLinkedList implements List, Serializable {
* be stored, if it is big enough; otherwise, a new array of the
* same runtime type is allocated for this purpose.
* @return an array containing the elements of this list.
* @exception ArrayStoreException
* @throws ArrayStoreException
* if the runtime type of the specified array
* is not a supertype of the runtime type of every element in
* this list.

View File

@ -178,7 +178,7 @@ public class FastArrayList extends ArrayList {
* @param index Index at which to insert this element
* @param element The element to be inserted
*
* @exception IndexOutOfBoundsException if the index is out of range
* @throws IndexOutOfBoundsException if the index is out of range
*/
public void add(int index, Object element) {
@ -230,7 +230,7 @@ public class FastArrayList extends ArrayList {
* @param index Index at which insertion takes place
* @param collection The collection to be added
*
* @exception IndexOutOfBoundsException if the index is out of range
* @throws IndexOutOfBoundsException if the index is out of range
*/
public boolean addAll(int index, Collection collection) {
@ -254,7 +254,7 @@ public class FastArrayList extends ArrayList {
* Remove all of the elements from this list. The list will be empty
* after this call returns.
*
* @exception UnsupportedOperationException if <code>clear()</code>
* @throws UnsupportedOperationException if <code>clear()</code>
* is not supported by this list
*/
public void clear() {
@ -405,7 +405,7 @@ public class FastArrayList extends ArrayList {
*
* @param index The index of the element to return
*
* @exception IndexOutOfBoundsException if the index is out of range
* @throws IndexOutOfBoundsException if the index is out of range
*/
public Object get(int index) {
@ -576,7 +576,7 @@ public class FastArrayList extends ArrayList {
*
* @param index The starting position of the iterator to return
* @return the list iterator
* @exception IndexOutOfBoundsException if the index is out of range
* @throws IndexOutOfBoundsException if the index is out of range
*/
public ListIterator listIterator(int index) {
if (fast) {
@ -593,7 +593,7 @@ public class FastArrayList extends ArrayList {
*
* @param index Index of the element to be removed
*
* @exception IndexOutOfBoundsException if the index is out of range
* @throws IndexOutOfBoundsException if the index is out of range
*/
public Object remove(int index) {
@ -643,7 +643,7 @@ public class FastArrayList extends ArrayList {
*
* @param collection Collection containing elements to be removed
*
* @exception UnsupportedOperationException if this optional operation
* @throws UnsupportedOperationException if this optional operation
* is not supported by this list
*/
public boolean removeAll(Collection collection) {
@ -670,7 +670,7 @@ public class FastArrayList extends ArrayList {
*
* @param collection Collection containing elements to be retained
*
* @exception UnsupportedOperationException if this optional operation
* @throws UnsupportedOperationException if this optional operation
* is not supported by this list
*/
public boolean retainAll(Collection collection) {
@ -702,7 +702,7 @@ public class FastArrayList extends ArrayList {
* @param index Index of the element to replace
* @param element The new element to be stored
*
* @exception IndexOutOfBoundsException if the index is out of range
* @throws IndexOutOfBoundsException if the index is out of range
*/
public Object set(int index, Object element) {
@ -743,7 +743,7 @@ public class FastArrayList extends ArrayList {
* @param fromIndex The starting index of the sublist view
* @param toIndex The index after the end of the sublist view
*
* @exception IndexOutOfBoundsException if an index is out of range
* @throws IndexOutOfBoundsException if an index is out of range
*/
public List subList(int fromIndex, int toIndex) {
if (fast) {
@ -780,7 +780,7 @@ public class FastArrayList extends ArrayList {
*
* @param array Array defining the element type of the returned list
*
* @exception ArrayStoreException if the runtime type of <code>array</code>
* @throws ArrayStoreException if the runtime type of <code>array</code>
* is not a supertype of the runtime type of every element in this list
*/
public Object[] toArray(Object array[]) {

View File

@ -168,7 +168,7 @@ public class ComparatorChain implements Comparator, Serializable {
*
* @param index index of the Comparator to replace
* @param comparator Comparator to place at the given index
* @exception IndexOutOfBoundsException
* @throws IndexOutOfBoundsException
* if index &lt; 0 or index &gt;= size()
*/
public void setComparator(int index, Comparator comparator)
@ -260,7 +260,7 @@ public class ComparatorChain implements Comparator, Serializable {
* @param o1 the first object to compare
* @param o2 the second object to compare
* @return -1, 0, or 1
* @exception UnsupportedOperationException
* @throws UnsupportedOperationException
* if the ComparatorChain does not contain at least one
* Comparator
*/

View File

@ -65,7 +65,7 @@ public class NullComparator implements Comparator, Serializable {
* non-<code>null</code> objects. This argument cannot be
* <code>null</code>
*
* @exception NullPointerException if <code>nonNullComparator</code> is
* @throws NullPointerException if <code>nonNullComparator</code> is
* <code>null</code>
**/
public NullComparator(Comparator nonNullComparator) {
@ -104,7 +104,7 @@ public class NullComparator implements Comparator, Serializable {
* that <code>null</code> should be compared as lower than a
* non-<code>null</code> object.
*
* @exception NullPointerException if <code>nonNullComparator</code> is
* @throws NullPointerException if <code>nonNullComparator</code> is
* <code>null</code>
**/
public NullComparator(Comparator nonNullComparator, boolean nullsAreHigh) {

View File

@ -103,8 +103,8 @@ public class EnumerationIterator implements Iterator {
* If so, the first occurrence of the last returned object from this
* iterator will be removed from the collection.
*
* @exception IllegalStateException <code>next()</code> not called.
* @exception UnsupportedOperationException if no associated collection
* @throws IllegalStateException <code>next()</code> not called.
* @throws UnsupportedOperationException if no associated collection
*/
public void remove() {
if (collection != null) {

View File

@ -259,7 +259,7 @@ public abstract class AbstractTestObject extends BulkTest {
*
* @param o Object to serialize
* @param path path to write the serialized Object
* @exception IOException
* @throws IOException
*/
protected void writeExternalFormToDisk(Serializable o, String path) throws IOException {
FileOutputStream fileStream = new FileOutputStream(path);
@ -272,7 +272,7 @@ public abstract class AbstractTestObject extends BulkTest {
*
* @param o Object to convert to bytes
* @return serialized form of the Object
* @exception IOException
* @throws IOException
*/
protected byte[] writeExternalFormToBytes(Serializable o) throws IOException {
ByteArrayOutputStream byteStream = new ByteArrayOutputStream();
@ -287,8 +287,8 @@ public abstract class AbstractTestObject extends BulkTest {
*
* @param path path to the serialized Object
* @return the Object at the given path
* @exception IOException
* @exception ClassNotFoundException
* @throws IOException
* @throws ClassNotFoundException
*/
protected Object readExternalFormFromDisk(String path) throws IOException, ClassNotFoundException {
FileInputStream stream = new FileInputStream(path);
@ -301,8 +301,8 @@ public abstract class AbstractTestObject extends BulkTest {
*
* @param b byte array containing a serialized Object
* @return Object contained in the bytes
* @exception IOException
* @exception ClassNotFoundException
* @throws IOException
* @throws ClassNotFoundException
*/
protected Object readExternalFormFromBytes(byte[] b) throws IOException, ClassNotFoundException {
ByteArrayInputStream stream = new ByteArrayInputStream(b);