Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Type Safety(Type Safety warning message)
Type Safety [message #690449] Wed, 29 June 2011 14:39 Go to next message
Andy  is currently offline Andy Friend
Messages: 16
Registered: May 2011
Junior Member
Why does the statement:
ArrayList<ProjectBean> projectList = (ArrayList<ProjectBean>)(session.getAttribute("currentProjectList"));
generate the following warning message:
"Type safety: Unchecked cast from Object to ArrayList<ProjectBean>"

The code runs correctly.
I have imported ProjectBean.
I am not sure why I am getting the warning. Confused
Re: Type Safety [message #690485 is a reply to message #690449] Wed, 29 June 2011 14:57 Go to previous messageGo to next message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 29-Jun-11 08:39, Andy wrote:
> Why does the statement:
> ArrayList<ProjectBean> projectList =
> (ArrayList<ProjectBean>)(session.getAttribute("currentProjectList"));
> generate the following warning message:
> "Type safety: Unchecked cast from Object to ArrayList<ProjectBean>"
>
> The code runs correctly.
> I have imported ProjectBean.
> I am not sure why I am getting the warning. :?

This is really more of a Java question, isn't it Andy?

Good forums for Java questions include JavaRanch and JGuru.
Re: Type Safety [message #690506 is a reply to message #690485] Wed, 29 June 2011 15:48 Go to previous messageGo to next message
Andy  is currently offline Andy Friend
Messages: 16
Registered: May 2011
Junior Member
Yeah, I guess it is. I am not sure how to delete this message.
Re: Type Safety [message #690532 is a reply to message #690506] Wed, 29 June 2011 16:06 Go to previous message
Russell Bateman is currently offline Russell BatemanFriend
Messages: 3798
Registered: July 2009
Location: Provo, Utah, USA
Senior Member

On 29-Jun-11 09:48, Andy wrote:
> Yeah, I guess it is. I am not sure how to delete this message.

No need, my friend.
Previous Topic:Birt-viewer in tomacat
Next Topic:EclipseME can not run,who can help me?
Goto Forum:
  


Current Time: Thu Apr 25 05:36:28 GMT 2024

Powered by FUDForum. Page generated in 0.08482 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top