commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1135933 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java
Date Wed, 15 Jun 2011 06:45:41 GMT
Author: simonetripodi
Date: Wed Jun 15 06:45:41 2011
New Revision: 1135933

URL: http://svn.apache.org/viewvc?rev=1135933&view=rev
Log:
put expected value first, when asserting vertices equality

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java?rev=1135933&r1=1135932&r2=1135933&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/Dijkstra.java
Wed Jun 15 06:45:41 2011
@@ -83,7 +83,7 @@ public final class Dijkstra
             {
                 InMemoryPath<V, WE> path = new InMemoryPath<V, WE>( source, target,
shortestDistances.get( target ) );
 
-                while ( !vertex.equals( source ) )
+                while ( !source.equals( vertex ) )
                 {
                     WE edge = predecessors.get( vertex );
 



Mime
View raw message