You did misunderstand something, yes.
If you look at the source of the @SuppressWarnings annotation, you will find that it declares where it can be used. Off the top of my head, I think it can be used at the method level or at the assignment statement level.
You are using it at the assignment statement level, and consequently it is only having an effect on the assignment statement. I suspect the warning you are seeing is coming from the line after the assignment.
Fixes:
1) Move the annotation to the whole method
2) Fix the code so it doesn't generate the warning in the first place
> Oh, so I can't effect a simple local variable, just
> functions, and above.
> Thx a lot!
From the javadoc for SuppressWarnings:
@Target(value={TYPE,FIELD,METHOD,PARAMETER,CONSTRUCTOR,LOCAL_VARIABLE})
@Retention(value=SOURCE)
public @interface SuppressWarnings
"Indicates that the named compiler warnings should be suppressed in the annotated element (and in all program elements contained in the annotated element). Note that the set of warnings suppressed in a given element is a superset of the warnings suppressed in all containing elements. For example, if you annotate a class to suppress one warning and annotate a method to suppress another, both warnings will be suppressed in the method. "
So a SuppressWarnings annotation can be used on a class, or method, or field, etc. as indicated by its target list. To suppress a warning throughout the body of a method, annotate the method. Putting SuppressWarning on a field will only suppress warnings in the expression being used to assign the field.