You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2012/02/19 23:14:26 UTC
svn commit: r1291072 -
/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/DefaultHeuristicBuilder.java
Author: marcosperanza
Date: Sun Feb 19 22:14:25 2012
New Revision: 1291072
URL: http://svn.apache.org/viewvc?rev=1291072&view=rev
Log:
Added comment for clarify the SuppressWarning annotation
Modified:
commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/DefaultHeuristicBuilder.java
Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/DefaultHeuristicBuilder.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/DefaultHeuristicBuilder.java?rev=1291072&r1=1291071&r2=1291072&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/DefaultHeuristicBuilder.java (original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/DefaultHeuristicBuilder.java Sun Feb 19 22:14:25 2012
@@ -91,8 +91,8 @@ final class DefaultHeuristicBuilder<V ex
}
closedSet.add( current );
-
- @SuppressWarnings( "unchecked" )
+
+ @SuppressWarnings( "unchecked" ) // unsafe cast protected by the instanceof statement that already verifies the assignment
Iterable<V> connected = ( graph instanceof DirectedGraph ) ? ( (DirectedGraph<V, WE>) graph ).getOutbound( current )
: graph.getConnectedVertices( current );
for ( V v : connected )