commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From marcospera...@apache.org
Subject svn commit: r1291072 - /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/shortestpath/DefaultHeuristicBuilder.java
Date Sun, 19 Feb 2012 22:14:26 GMT
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 )



Mime
View raw message