Skip to main content



      Home
Home » Newcomers » Newcomers » Type Safety(Type Safety warning message)
Type Safety [message #690449] Wed, 29 June 2011 10:39 Go to next message
Eclipse UserFriend
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 10:57 Go to previous messageGo to next message
Eclipse UserFriend
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 11:48 Go to previous messageGo to next message
Eclipse UserFriend
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 12:06 Go to previous message
Eclipse UserFriend
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: Wed Jul 23 17:49:39 EDT 2025

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

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

Back to the top