Win a copy of Kotlin in Action this week in the Kotlin forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Type Safety: Erased Type?  RSS feed

 
James Dekker
Ranch Hand
Posts: 222
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello there,

Have a small question regarding generics...

The framework that I've been working with is compiled and closed, hence, I am unable to see the Java source.

Here's some code:



In Eclipse 3.2, I am getting this warning under the Problems view:



Like earlier stated, the affiliate reference is part of a closed library which was written in JDK 1.4.

Is there a way to alleviate / remove this warning from appearing in Eclipse (am not asking to set Eclipse to ignore it)?

After googling this, I replaced the above code with:



And now the warning in Eclipse is gone! Is this the right solution?

The problem is that I just want to use Set not HashSet...

Sincerely,

James
[ January 24, 2007: Message edited by: James Dekker ]
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the type of "affiliate"?
 
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!