Fix some compiler warnings about unchecked types
Change-Id: Ib360aa05fd0e194a65bbc0b624447e4bdb4ced93
diff --git a/utils/misc/src/main/java/org/onlab/graph/KshortestPathSearch.java b/utils/misc/src/main/java/org/onlab/graph/KshortestPathSearch.java
index db8402d..31e2523 100644
--- a/utils/misc/src/main/java/org/onlab/graph/KshortestPathSearch.java
+++ b/utils/misc/src/main/java/org/onlab/graph/KshortestPathSearch.java
@@ -46,7 +46,7 @@
// Initialize the graph.
public KshortestPathSearch(Graph<V, E> graph) {
immutableGraph = graph;
- mutableGraph = new MutableAdjacencyListsGraph(graph.getVertexes(),
+ mutableGraph = new MutableAdjacencyListsGraph<>(graph.getVertexes(),
graph.getEdges());
}
@@ -136,6 +136,7 @@
}
}
+ @SuppressWarnings({ "rawtypes", "unchecked" })
private List<E> searchShortestPath(Graph<V, E> graph, V src, V dst) {
// Determine the shortest path from the source to the destination by using the Dijkstra algorithm.
DijkstraGraphSearch dijkstraAlg = new DijkstraGraphSearch();