public void addProductList(ArrayList<ViewOrderProduct> globalOrderProductList) {
this.productOrderList = (ArrayList<ViewOrderProduct>)globalOrderProductList.clone();
}
This gives me the warning:
Type safety: Unchecked cast from Object to ArrayList
I know that I can simply solve the problem adding @SuppressWarnings("unchecked")
.
But I want understand the problem. I can be sure that all goes good if I add the suppressWarnings? Is there another solution for this warning?