Erased data type
"Mann, Ivan H" <[email protected]>
| Newsgroups | gmane.comp.windows.devel.java.advanced |
|---|---|
| Message-ID | <3E47D20FD1918B48AC434AA83B575296A04355@usplm215.amer.corp.eds.com> |
I have an app with a gui that can develop a lot of data. There is a
save button, which writes the data out using serialization.
Then, there is a load button, which reads the data back in, using this
line:
destinations = (ArrayList<ScheduleDestination>) is.readObject()
;
Where destinations is defined elsewhere as
ArrayList<ScheduleDestination> destinations ;
On the line that reads the object back in, there is a compiler flag:
Type Safety: The cast from Object to
ArrayList<ScheduleDestination> is actually checking against the erased
type ArrayList.
What does this flag mean? I have googled fairly creatively and can't
find anything which tells me what it means or how to make it go away.
Ivan Mann
===================================
This list is hosted by DevelopMentor® http://www.develop.com
View archives and manage your subscription(s) at http://discuss.develop.com