Request for review : 7121314 : Behavior mismatch between AbstractCollection.toArray(T[] ) and its spec
Ulf Zibis
Ulf.Zibis at gmx.de
Sun Apr 1 17:02:21 UTC 2012
Am 01.04.2012 11:24, schrieb Sean Chou:
> Hi David,
>
> I made the new webrev with your modified testcase:
> http://cr.openjdk.java.net/~zhouyx/7121314/webrev.04/ .
Looks perfect.
Little nits:
There is no need to instantiate a ToArray object; test() could be static.
Little better comments:
/* Returns collection's size; potentially can change after each invocation. */
@Override
public void size() {
...
int last() { // last possible input array index
....
1 missing case for completeness:
// Check null input
try {
res = CANDIDATE.toArray(null);
check(false);
} catch (Throwable t) {
check(t instanceof NullPointerException);
}
-Ulf
> The link to the bug:
> http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=7121314
> The link to the start of the thread:
>
> http://mail.openjdk.java.net/pipermail/core-libs-dev/2012-March/009512.html
More information about the core-libs-dev
mailing list