Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
    Bookmark Topic Watch Topic
  • New Topic

warning Type Safety while assign from object to serealizable Arralist

 
Abhay Ram
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Report post to moderator
Hi everybody i want to do like below but it shows the following warning .

Type safety: Unchecked cast from Object to
ArrayList<OfficeOfferLetter>


Code:

ArrayList<OfficeOfferLetter> allletters=new ArrayList<OfficeOfferLetter>();
allletters=(ArrayList<OfficeOfferLetter>) request.getAttribute("offerletters"):
[/code]
In the above code OfficeOfferLetter is the serealizable Bean Arraylist;

& request.getAttribute("offerletters") return the object thats why it shows above warning.

so please suggest any solution ...

thank you
 
Mohamed Sanaulla
Saloon Keeper
Posts: 3159
33
Google App Engine Java Ruby
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't post in multiple forums- CarefullyChooseOneForum.

This question has been posted here as well
 
    Bookmark Topic Watch Topic
  • New Topic