Java 1.5 - is there a way to get rid of this warning?

I have a function within my class:

publicvoid handleParameters(Map<String, String[]> paramMap){

}

I am calling it with an HttpServletRequest object using getParameterMap() method

handleParameters(request.getParameterMap())

object (returns a Map with keys as String and values as String[]),

which gives the warning that type Map needs unchecked conversion to conform to Map<String, String[]>

Is there anyway around this?

I mean it does compile okay but I was trying to clean up any warnings that can be eliminated.

[700 byte] By [smiles78a] at [2007-11-26 19:59:53]
# 1
@SuppressWarnings({"unchecked"})- Saish
Saisha at 2007-7-9 22:57:01 > top of Java-index,Java Essentials,Java Programming...
# 2
> Is there anyway around this?It's a natural consequence of interfacing generic code with pre-generics code.You can suppress the warning with:@SuppressWarnings("unchecked")Edit: Saish's is prolly actually correct, with the braces
Lokoa at 2007-7-9 22:57:01 > top of Java-index,Java Essentials,Java Programming...
# 3
Where do you put that exactly?
smiles78a at 2007-7-9 22:57:01 > top of Java-index,Java Essentials,Java Programming...
# 4
well when using eclipse and i need to suppress warnings, i let it do it for me automatically and it puts it above the method.like this.@supress....public void thing(){}
abshirf2a at 2007-7-9 22:57:01 > top of Java-index,Java Essentials,Java Programming...
# 5

> Where do you put that exactly?

You can annotate the particular statement, or the method in which it occurs, or the entire class. You "put that" in front of whatever you want to annotate.

E.g.

class Something {

@SuppressWarnings({"unchecked"})

void someMethodInWhichSomethingUncheckedHappens() {

}

}

Lokoa at 2007-7-9 22:57:01 > top of Java-index,Java Essentials,Java Programming...
# 6
with the caveat that you can't annotate return statements with it, which can be annoying sometimes.
jwentinga at 2007-7-9 22:57:01 > top of Java-index,Java Essentials,Java Programming...