I have declared the following method:
private void mockInvokeDBHandler(Map... rows) {
List
There's no way to avoid this warning, other than adding @SuppresWarning("unchecked") to the method :)
Since you say it's a private method there's no "clients" in this case and you're in control of the method, so ignoring the warning seems reasonable.
A few times when I've created methods taking parameterized types as a varargs parameter, I've created some overloads:
void mockInvokeDBHandler(Map map1)
void mockInvokeDBHandler(Map map1, Map map2)
void mockInvokeDBHandler(Map map1, Map map2, Map... othermaps)
That could avoid some of the warnings, depending on how many arguments are supplied.