Varargs can select an unexpected overload
A varargs overload may capture calls that previously matched another signature, especially with null or empty arguments. Avoid ambiguous overload sets and test source compatibility.
Clear note on java / overloading. "Varargs can select an unexpected overload" is the kind of detail that is easy to overlook.
- @saltysamm▲ 3
Clear note on java / overloading. "Varargs can select an unexpected overload" is the kind of detail that is easy to overlook.
- @sohumm15▲ 3
Good to see "Varargs can select an unexpected overload" written down. Handy reference for anyone working with java / overloading.
Illuminating
- @deneil2121▲ 2
Straightforward
- @ohmshawas23▲ 1
Illuminating
- @sohmeh▲ 1
"Varargs can select an unexpected overload" is a useful thing to know about with java / overloading. Thanks for sharing it.
First-rate
Good to see "Varargs can select an unexpected overload" written down. Handy reference for anyone working with java / overloading.
Varargs overloads are considered only if no fixed-arity overload applies, so adding a varargs overload does not affect calls that already match a fixed one. Corrections or other cases welcome below.
Clear note on java / overloading. "Varargs can select an unexpected overload" is the kind of detail that is easy to overlook.
Specific and to the point: "Varargs can select an unexpected overload". Worth a look if you touch java / overloading.
Appreciate the write-up on "Varargs can select an unexpected overload". Useful for anyone using java / overloading.