You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Benedikt Ritter (JIRA)" <ji...@apache.org> on 2014/11/30 19:38:12 UTC
[jira] [Commented] (LANG-1070) confusing example in
ArrayUtils.add()
[ https://issues.apache.org/jira/browse/LANG-1070?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14229190#comment-14229190 ]
Benedikt Ritter commented on LANG-1070:
---------------------------------------
The current behavior of {{add(T[], T)}} seems to be inconsistent with the various varargs methods. For example calling {{addAll(boolean[], boolean...)}} with null will return null. So maybe instead of changing the docs, we should let {{add(T[], T)}} simply return null for null inputs. WDYT?
> confusing example in ArrayUtils.add()
> -------------------------------------
>
> Key: LANG-1070
> URL: https://issues.apache.org/jira/browse/LANG-1070
> Project: Commons Lang
> Issue Type: Improvement
> Components: lang.*
> Affects Versions: 3.3.2
> Reporter: Paul Pogonyshev
> Priority: Trivial
>
> Method documentation claims that
> ArrayUtils.add(null, null) = null
> However, this is not true since this parameter combination leads to an exception.
> Either remove this line from documentation, or rewrite it to explicitly mention the exception. Maybe there are other related methods with similar problem in the docs.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)