You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Duncan Jones <du...@wortharead.com> on 2017/05/24 06:34:36 UTC

[LANG] Unsafe use of varargs (LANG-1295/1296)

Hi everyone,

I would welcome some comments on LANG-1295 [1] and LANG-1296 [2], which I raised about unsafe use of varargs in ArrayUtils.toArray(T... items) and ArrayUtils.addAll(T[] array1, T... array2).

Should we deprecate these methods (to be removed in 4.0), since they can cause a ClassCastException in some scenarios? Or should we just document the inadequacies? If the latter, is anyone familiar with this topic area and able to provide an exhaustive list of problematic use cases?

Thanks,
Duncan

[1] https://issues.apache.org/jira/browse/LANG-1295
[2] https://issues.apache.org/jira/browse/LANG-1296
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org