File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes warning Type Safety while assign from object to serealizable Arralist Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Reply locked New topic
Author

warning Type Safety while assign from object to serealizable Arralist

Abhay Ram
Greenhorn

Joined: Dec 14, 2010
Posts: 7
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

Joined: Sep 08, 2007
Posts: 3071
    
  33

Please don't post in multiple forums- CarefullyChooseOneForum.

This question has been posted here as well


Mohamed Sanaulla | My Blog
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: warning Type Safety while assign from object to serealizable Arralist