Merge "Use toArray(T[]) instead of toArray()." am: bede9f869b
am: 48e3098dbb

Change-Id: I39e212ff1c2c6d1e39e8a420bead01fb9a731e16