commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1134828 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/decorator/DDirectedGraph.java
Date Sat, 11 Jun 2011 23:38:35 GMT
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;
     }
 
     /**



Mime
View raw message