commons-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From simonetrip...@apache.org
Subject svn commit: r1136998 - in /commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model: InMemoryPath.java InMemoryWeightedPath.java
Date Fri, 17 Jun 2011 19:30:32 GMT
Author: simonetripodi
Date: Fri Jun 17 19:30:32 2011
New Revision: 1136998

URL: http://svn.apache.org/viewvc?rev=1136998&view=rev
Log:
suppressed unchecked warnings in equal() implementations

Modified:
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java
    commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryWeightedPath.java

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java?rev=1136998&r1=1136997&r2=1136998&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryPath.java
Fri Jun 17 19:30:32 2011
@@ -159,7 +159,8 @@ public class InMemoryPath<V extends Vert
             return false;
         }
 
-        InMemoryPath other = (InMemoryPath) obj;
+        @SuppressWarnings( "unchecked" ) // test against any Path typed instance
+        InMemoryPath<Vertex, Edge<Vertex>> other = (InMemoryPath<Vertex, Edge<Vertex>>)
obj;
         if ( !source.equals( other.getSource() ) )
         {
             return false;

Modified: commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryWeightedPath.java
URL: http://svn.apache.org/viewvc/commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryWeightedPath.java?rev=1136998&r1=1136997&r2=1136998&view=diff
==============================================================================
--- commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryWeightedPath.java
(original)
+++ commons/sandbox/graph/trunk/src/main/java/org/apache/commons/graph/model/InMemoryWeightedPath.java
Fri Jun 17 19:30:32 2011
@@ -91,7 +91,8 @@ public final class InMemoryWeightedPath<
             return false;
         }
 
-        InMemoryWeightedPath other = (InMemoryWeightedPath) obj;
+        @SuppressWarnings( "unchecked" ) // test against any WeightedPath typed instance
+        InMemoryWeightedPath<Vertex, WeightedEdge<Vertex>> other = (InMemoryWeightedPath<Vertex,
WeightedEdge<Vertex>>) obj;
         if ( !weigth.equals( other.getWeight() ) )
         {
             return false;



Mime
View raw message