commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1363116 - /commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ContextBase.java
Date Wed, 18 Jul 2012 21:05:45 GMT
Author: simonetripodi
Date: Wed Jul 18 21:05:45 2012
New Revision: 1363116

URL: http://svn.apache.org/viewvc?rev=1363116&view=rev
Log:
removed unneeded 'else' branches

Modified:
    commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ContextBase.java

Modified: commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ContextBase.java
URL: http://svn.apache.org/viewvc/commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ContextBase.java?rev=1363116&r1=1363115&r2=1363116&view=diff
==============================================================================
--- commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ContextBase.java
(original)
+++ commons/proper/chain/trunk/core/src/main/java/org/apache/commons/chain2/impl/ContextBase.java
Wed Jul 18 21:05:45 2012
@@ -399,9 +399,8 @@ public class ContextBase extends Context
     private Map.Entry<String, Object> entry(String key) {
         if (containsKey(key)) {
             return (new MapEntryImpl(key, get(key)));
-        } else {
-            return (null);
         }
+        return (null);
     }
 
     /**
@@ -552,9 +551,8 @@ public class ContextBase extends Context
             Entry<String, Object> actual = ContextBase.this.entry(entry.getKey());
             if (actual != null) {
                 return (actual.equals(entry));
-            } else {
-                return (false);
             }
+            return (false);
         }
 
         @Override
@@ -576,14 +574,14 @@ public class ContextBase extends Context
                 @SuppressWarnings("unchecked")
                 Map.Entry<String, Object> entry = (Map.Entry<String, Object>)
obj;
                 return (ContextBase.this.remove(entry));
-            } else {
-                return (false);
             }
+            return (false);
         }
 
         public int size() {
             return (ContextBase.this.size());
         }
+
     }
 
     /**
@@ -611,7 +609,6 @@ public class ContextBase extends Context
 
     }
 
-
     /**
      * <p>Private implementation of <code>Map.Entry</code> for each item
in
      * <code>EntrySetImpl</code>.</p>
@@ -641,12 +638,10 @@ public class ContextBase extends Context
             if (key.equals(entry.getKey())) {
                 if (value == null) {
                     return (entry.getValue() == null);
-                } else {
-                    return (value.equals(entry.getValue()));
                 }
-            } else {
-                return (false);
+                return (value.equals(entry.getValue()));
             }
+            return (false);
         }
 
         public String getKey() {
@@ -716,9 +711,8 @@ public class ContextBase extends Context
                 @SuppressWarnings("unchecked")
                 Map.Entry<String, Object> entry = (Map.Entry<String, Object>)
obj;
                 return (ContextBase.this.remove(entry));
-            } else {
-                return (false);
             }
+            return (false);
         }
 
         public int size() {



Mime
View raw message