That warning would come when you invoke the getEdges()
method on raw type Graph
. When that is the case, all the generic types are replaced with their erasure. So, for Graph
raw type, the method signature becomes like:
public ArrayList getEdges();
Solution is to use parameterized type or wildcard types.