Merge "Don't use toArray() inappropriately" into jb-mr1-dev