Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-devel] A-ha I found it

I started looking into annotations today, and found a totally sensible use for them. At least it made sense as soon as I found them.

  /**
   * Normal pre-1.5 method body
   */
  @SuppressWarnings(value={"unchecked"})
  public void nonGenericsMethod() {
    List wordList = new ArrayList();

    wordList.add("foo");
  }


What this allows you to do is place a compiler hint next to the code where you wish to ignore a warning.

Java 5 - welcome to the 1970s.

Jody out.


Back to the top