commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1101771 - /commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
Date Wed, 11 May 2011 07:16:52 GMT
Author: simonetripodi
Date: Wed May 11 07:16:52 2011
New Revision: 1101771

URL: http://svn.apache.org/viewvc?rev=1101771&view=rev
Log:
emoved useless 'else' statements

Modified:
    commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java

Modified: commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
URL: http://svn.apache.org/viewvc/commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java?rev=1101771&r1=1101770&r2=1101771&view=diff
==============================================================================
--- commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
(original)
+++ commons/sandbox/digester3/trunk/src/main/java/org/apache/commons/digester3/Digester.java
Wed May 11 07:16:52 2011
@@ -2844,14 +2844,14 @@ public class Digester extends DefaultHan
                 log.debug("Stack '" + stackName + "' is empty");
             }        
             throw new EmptyStackException();
-        
-        } else {
-            int index = (namedStack.size() - 1) - n;
-            if (index < 0) {
-                throw new EmptyStackException();
-            }
-            result = namedStack.get(index);
         }
+
+        int index = (namedStack.size() - 1) - n;
+        if (index < 0) {
+            throw new EmptyStackException();
+        }
+        result = namedStack.get(index);
+
         return result;
     }
 



Mime
View raw message