I have two vectors declared as a private class property:
private Vector<Myobject> v1 = new Vector<Myobject>();
private Vector<Myobject> v2 = new Vector<Myobject>();
I populate v1 with a bunch of Myobjects.
I need to make a shallow clone from v1 to v2. I tried:
v2 = v1.clone();
I get "unverified or unsafe operations."
I have tried all forms of casting and seem to be unable to overcome this warning.
Even if I delete the second (v2) declaration and try and just clone:
Vector<Myobject> v2 = v1.clone();
or
Vector<Myobject> v2 = ( Vector<Myobject> ) v1.clone();
... still getting it.
I am sure that I am missing something very elementary here ...
Thanks in advance
Robny source
share