Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

unchecked assignment warning question

843793Nov 7 2003 — edited Nov 9 2003
Is there any way to get around "unchecked assignment" compiler
warnings for these situations?

1.
ObjectInputStream ois;
List<someType> list;

Object o = ois.readObject();
list.add(o);

2.
Class<someType> c = Class.forName("someClassName");

Thanks,
Eric
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 7 2003
Added on Nov 7 2003
5 comments
434 views