Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / July 2005

Tip: Looking for answers? Try searching our database.

@SuppressWarnings("unchecked") not working

Thread view: 
HK - 19 Jul 2005 11:39 GMT
According to the docs, I thought I could get rid of those

 warning: [unchecked] unchecked conversion

at well defined places. I am using build 1.5.0_04-b05 which
seems to be the most recent one. I am using

@SuppressWarnings("unchecked")
public class Bla<T> {
 Bla<T>[] b = new Bla[10];
}

but still get the warning when compiling with -Xlint:unchecked.

Any ideas how to get it to work? According to
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6223153
it should work.

 Harald.
Thomas Hawtin - 19 Jul 2005 13:58 GMT
> Any ideas how to get it to work? According to
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6223153
> it should work.

The relevant bug is:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4986256

Fixed in mustang(b29). So to get it to work, install a mustang snapshot.
I believe the compiler used by Eclipse also takes note of the annotation.

Tom Hawtin
Signature

Unemployed English Java programmer

HK - 19 Jul 2005 14:30 GMT
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4986256
>
> Fixed in mustang(b29). So to get it to work, install a mustang snapshot.
> I believe the compiler used by Eclipse also takes note of the annotation.

Where can I get this b29? On the official download page
I only find build 1.5.0_04-b05.

 Harald.
Thomas Weidenfeller - 19 Jul 2005 15:22 GMT
> Where can I get this b29? On the official download page
> I only find build 1.5.0_04-b05.

Mustang is Java 1.6, not 1.5. A preliminary version should be available
somewhere from https://mustang.dev.java.net/

Whether using such an early alpha version is a good idea is another
question.

/Thomas

Signature

The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/

Stefan Schulz - 19 Jul 2005 18:26 GMT
> The relevant bug is:
>
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4986256
>
> Fixed in mustang(b29). So to get it to work, install a mustang snapshot.
> I believe the compiler used by Eclipse also takes note of the annotation.

The eclipse compiler also supports @SuppressWarning annotations.

Signature

You can't run away forever,
But there's nothing wrong with getting a good head start.
          --- Jim Steinman, "Rock and Roll Dreams Come Through"
         



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.