"an invocation was made, but result is hard to predict unless you understand deeply the rules of varargs" -- Philippe P. Mulet
void test(){
invoke(new Class[0]); // is Class[] passed directly as an Object[] (1),
// or wrappered into a new Object[] (2) ?
}
Object invoke(Object... args) {
return null;
}
invoke((Object[])new Class[0]);
"The warning indicates that (1) got picked, but should be clarified by inserting a cast in the code: invoke((Object[])new Class[0]);"
Problem because:
Hard to understand, possibly a bug
Severity: Medium