@SuppressWarnings("unchecked") not working

Discussion in 'Java' started by HK, Jul 19, 2005.

  1. HK

    HK Guest

    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.
     
    HK, Jul 19, 2005
    #1
    1. Advertising

  2. Thomas Hawtin, Jul 19, 2005
    #2
    1. Advertising

  3. HK

    HK Guest

    Thomas Hawtin wrote:
    > 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.
     
    HK, Jul 19, 2005
    #3
  4. Thomas Weidenfeller, Jul 19, 2005
    #4
  5. On Tue, 19 Jul 2005 13:58:43 +0100, Thomas Hawtin wrote:

    > 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.

    --
    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"
     
    Stefan Schulz, Jul 19, 2005
    #5
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Ian McCall
    Replies:
    8
    Views:
    11,808
    Roedy Green
    Nov 19, 2005
  2. RVic
    Replies:
    19
    Views:
    1,451
  3. Mayeul
    Replies:
    2
    Views:
    3,493
  4. Andreas Leitgeb
    Replies:
    6
    Views:
    547
    Mike Schilling
    Oct 22, 2009
  5. Roedy Green
    Replies:
    2
    Views:
    476
    Mike Schilling
    Oct 23, 2009
Loading...

Share This Page