ceylon/ceylon.language — pull request #416 by lucaswerkmeister (2014-03-15 00:22:42+00:00)
Title: Util: various improvements to toXArray functions

* use Iterator contract instead of `getRest()`
* use `System.arraycopy` where possible
* nullsafe
* whitespace fixes (untabify, trailing spaces)

Closes #232.

This commit is the result of squashing together all the commits in the [issue-232](https://github.com/lucaswerkmeister/ceylon.language/tree/issue-232) branch; I felt there was too much noise among those commits. If you want to merge that branch instead, feel free to!

Note also that due to a bug in my Eclipse’s JDT (Stack overflow when compiling or editing anything), this was written in Emacs. I hope that the indentation is okay (I tried to keep it consistent with the existing code, except where that was inconsistent itself – for example, a few lines were indented with tabs); I also added some `@SuppressWarnings("unchecked")` that might be unnecessary.