Originally posted by Saket Barve: Hello, I am getting type safety warning in my code, relevant part of which is reproduced below:
ArrayList itemAddArrayList = new ArrayList<MeasurementEvalSampleItemVO>();
ArrayList measEvalSampleItemList = sampleVO.getSampleItems();
MeasurementEvalSampleItemVO sampleItemVO =
( MeasurementEvalSampleItemVO ) measEvalSampleItemList.get(0);
itemAddArrayList.add(sampleItemVO); // Warning here!
The last line gives a warning stating: "The method add(Object) belongs to the raw type ArrayList. References to generic type ArrayList<E> should be parameterized." How does one get around this warning? The Quick Fix option in Eclipse doesn't seem to come up with very helpful options. Saket [ September 04, 2006: Message edited by: Saket Barve ]