commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ggreg...@apache.org
Subject svn commit: r1543241 - /commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
Date Tue, 19 Nov 2013 00:31:39 GMT
Author: ggregory
Date: Tue Nov 19 00:31:39 2013
New Revision: 1543241

URL: http://svn.apache.org/r1543241
Log:
Statement unnecessarily nested within else clause.

Modified:
    commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java

Modified: commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java?rev=1543241&r1=1543240&r2=1543241&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
(original)
+++ commons/proper/collections/trunk/src/main/java/org/apache/commons/collections4/iterators/NodeListIterator.java
Tue Nov 19 00:31:39 2013
@@ -72,9 +72,8 @@ public class NodeListIterator implements
     public Node next() {
         if (nodeList != null && index < nodeList.getLength()) {
             return nodeList.item(index++);
-        } else {
-            throw new NoSuchElementException("underlying nodeList has no more elements");
         }
+        throw new NoSuchElementException("underlying nodeList has no more elements");
     }
 
     /**



Mime
View raw message