You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ch...@apache.org on 2017/07/11 17:56:20 UTC

[50/50] commons-collections git commit: Update old school @exception with new school @throws.

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


Project: http://git-wip-us.apache.org/repos/asf/commons-collections/repo
Commit: http://git-wip-us.apache.org/repos/asf/commons-collections/commit/7f0185bd
Tree: http://git-wip-us.apache.org/repos/asf/commons-collections/tree/7f0185bd
Diff: http://git-wip-us.apache.org/repos/asf/commons-collections/diff/7f0185bd

Branch: refs/heads/COLLECTIONS_3_2_X
Commit: 7f0185bd3d44b9e1b2439d6685a418e7a91cac7a
Parents: 876942f
Author: Gary D. Gregory <gg...@apache.org>
Authored: Tue Jun 7 00:40:18 2016 +0000
Committer: Gary D. Gregory <gg...@apache.org>
Committed: Tue Jun 7 00:40:18 2016 +0000

----------------------------------------------------------------------
 .../collections/CursorableLinkedList.java       |  2 +-
 .../commons/collections/FastArrayList.java      | 22 ++++++++++----------
 .../comparators/ComparatorChain.java            |  4 ++--
 .../collections/comparators/NullComparator.java |  4 ++--
 .../iterators/EnumerationIterator.java          |  4 ++--
 .../commons/collections/AbstractTestObject.java | 12 +++++------
 6 files changed, 24 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/commons-collections/blob/7f0185bd/src/java/org/apache/commons/collections/CursorableLinkedList.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/commons/collections/CursorableLinkedList.java b/src/java/org/apache/commons/collections/CursorableLinkedList.java
index bc420ca..1d3b12b 100644
--- a/src/java/org/apache/commons/collections/CursorableLinkedList.java
+++ b/src/java/org/apache/commons/collections/CursorableLinkedList.java
@@ -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.

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/7f0185bd/src/java/org/apache/commons/collections/FastArrayList.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/commons/collections/FastArrayList.java b/src/java/org/apache/commons/collections/FastArrayList.java
index 4b11bc4..2bee770 100644
--- a/src/java/org/apache/commons/collections/FastArrayList.java
+++ b/src/java/org/apache/commons/collections/FastArrayList.java
@@ -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[]) {

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/7f0185bd/src/java/org/apache/commons/collections/comparators/ComparatorChain.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/commons/collections/comparators/ComparatorChain.java b/src/java/org/apache/commons/collections/comparators/ComparatorChain.java
index 93fbf2f..ddc0cce 100644
--- a/src/java/org/apache/commons/collections/comparators/ComparatorChain.java
+++ b/src/java/org/apache/commons/collections/comparators/ComparatorChain.java
@@ -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
      */

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/7f0185bd/src/java/org/apache/commons/collections/comparators/NullComparator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/commons/collections/comparators/NullComparator.java b/src/java/org/apache/commons/collections/comparators/NullComparator.java
index d52c6db..c0975e1 100644
--- a/src/java/org/apache/commons/collections/comparators/NullComparator.java
+++ b/src/java/org/apache/commons/collections/comparators/NullComparator.java
@@ -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) {

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/7f0185bd/src/java/org/apache/commons/collections/iterators/EnumerationIterator.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/commons/collections/iterators/EnumerationIterator.java b/src/java/org/apache/commons/collections/iterators/EnumerationIterator.java
index f18f978..e91a058 100644
--- a/src/java/org/apache/commons/collections/iterators/EnumerationIterator.java
+++ b/src/java/org/apache/commons/collections/iterators/EnumerationIterator.java
@@ -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) {

http://git-wip-us.apache.org/repos/asf/commons-collections/blob/7f0185bd/src/test/org/apache/commons/collections/AbstractTestObject.java
----------------------------------------------------------------------
diff --git a/src/test/org/apache/commons/collections/AbstractTestObject.java b/src/test/org/apache/commons/collections/AbstractTestObject.java
index 41647af..42d81d5 100644
--- a/src/test/org/apache/commons/collections/AbstractTestObject.java
+++ b/src/test/org/apache/commons/collections/AbstractTestObject.java
@@ -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);