This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes I got a Type-Safe Warning Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "I got a Type-Safe Warning" Watch "I got a Type-Safe Warning" New topic
Author

I got a Type-Safe Warning

Denny Kim
Greenhorn

Joined: Jan 31, 2007
Posts: 1
HI~ nice meet you. I have a guestion!.

I use WeakReference in my LockManager Class. Here,



But,I got a Type-Safe Warning When I compiled this.!!

Note: Db.java uses unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details.

Then, I modified Map.



As expected,It is the same as this.

Now,How do i fix this(Type-safe warning)? Please,Help me.

[ January 31, 2007: Message edited by: Denny Kim ]

(edited: SCJD is a quiet place, don't shout in topic titles)
[ February 01, 2007: Message edited by: Barry Gaunt ]
Barry Gaunt
Ranch Hand

Joined: Aug 03, 2002
Posts: 7729
Do not forget that WeakReference is a generic class:




Ask a Meaningful Question and HowToAskQuestionsOnJavaRanch
Getting someone to think and try something out is much more useful than just telling them the answer.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: I got a Type-Safe Warning
 
Similar Threads
access Singleton class method thru jsp useBean
HashMap bean with generic type parameters
ClassCast exception
Query on enhanced FOR loop
generics compiler warning