I have an ArrayList of object of class B that all implements Serializable interface
public void copy(List<B> listToCopy){
List<B> list = listToCopy.strem().map(SerializationUtils::clone).collect(Collectors.toList());
}
A compile error indicates that the list property is expecting an List and not a List
In all the examples I saw(even in StackOverflow forum) none of them use any type of Cast
So how i fix this using the Apache Commons Lanf library?
Thanks in advance