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 fill up v1 with a bunch of Myobjects.
I need to do a shallow clone of v1 to v2. I tried:
v2 = v1.clone();
I get "unchecked or unsafe operations".
I've tried all forms of casting and cannot seem to overcome this warning.
Even if I remove the second (v2) declaration and try and just clone:
Vector<Myobject> v2 = v1.clone();
or
Vector<Myobject> v2 = ( Vector<Myobject> ) v1.clone();
... still get it.
I'm sure I'm missing something very basic here...
Thanks in advance