• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Sheriffs:
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

Type Safety: Erased Type?

 
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 ]
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the type of "affiliate"?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!