You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by si...@apache.org on 2012/03/01 09:00:03 UTC

svn commit: r1295455 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java

Author: simonetripodi
Date: Thu Mar  1 08:00:02 2012
New Revision: 1295455

URL: http://svn.apache.org/viewvc?rev=1295455&view=rev
Log:
NoSuchElement exception is an unchecked exception

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java?rev=1295455&r1=1295454&r2=1295455&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/visit/DefaultVisitAlgorithmsSelector.java Thu Mar  1 08:00:02 2012
@@ -24,8 +24,9 @@ import static org.apache.commons.graph.u
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.LinkedList;
-import java.util.NoSuchElementException;
+import java.util.Queue;
 import java.util.Set;
+import java.util.Stack;
 
 import org.apache.commons.graph.DirectedGraph;
 import org.apache.commons.graph.Edge;
@@ -207,9 +208,8 @@ final class DefaultVisitAlgorithmsSelect
          * Removes and returns the element from the collection according to the
          * defined behavior (LIFO vs. FIFO).
          * @return the next element
-         * @throws NoSuchElementException if the collection is empty
          */
-        public P pop() throws NoSuchElementException
+        public P pop()
         {
             return isQueue ? list.removeFirst() : list.removeLast();
         }