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 2011/06/12 01:38:35 UTC

svn commit: r1134828 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/decorator/DDirectedGraph.java

Author: simonetripodi
Date: Sat Jun 11 23:38:34 2011
New Revision: 1134828

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

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/decorator/DDirectedGraph.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/decorator/DDirectedGraph.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/decorator/DDirectedGraph.java?rev=1134828&r1=1134827&r2=1134828&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/decorator/DDirectedGraph.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/decorator/DDirectedGraph.java Sat Jun 11 23:38:34 2011
@@ -96,17 +96,11 @@ public class DDirectedGraph<V extends Ve
         {
             return weighted.getWeight( e );
         }
-        else
+        if ( weights.containsKey( e ) )
         {
-            if ( weights.containsKey( e ) )
-            {
-                return weights.get( e );
-            }
-            else
-            {
-                return 1.0;
-            }
+            return weights.get( e );
         }
+        return 1.0;
     }
 
     /**