The parameter of collection.toArray() method only need to express the type convert to , no need to specify the length of the parameter array.

Comment From: sbrannen

This has been merged into master.

Thanks