Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

I got a Type-Safe Warning

 
Denny Kim
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 7729
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Do not forget that WeakReference is a generic class:


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic