diff options
author | Zheng RuiFeng <ruifengz@foxmail.com> | 2016-10-21 09:49:37 +0100 |
---|---|---|
committer | Sean Owen <sowen@cloudera.com> | 2016-10-21 09:49:37 +0100 |
commit | a8ea4da8d04c1ed621a96668118f20739145edd2 (patch) | |
tree | dd869c7ed750828e9efc936e1963e5ae571a6df8 /build | |
parent | 595893d33a26c838c8c5c0c599fbee7fa61cbdff (diff) | |
download | spark-a8ea4da8d04c1ed621a96668118f20739145edd2.tar.gz spark-a8ea4da8d04c1ed621a96668118f20739145edd2.tar.bz2 spark-a8ea4da8d04c1ed621a96668118f20739145edd2.zip |
[SPARK-17331][FOLLOWUP][ML][CORE] Avoid allocating 0-length arrays
## What changes were proposed in this pull request?
`Array[T]()` -> `Array.empty[T]` to avoid allocating 0-length arrays.
Use regex `find . -name '*.scala' | xargs -i bash -c 'egrep "Array\[[A-Za-z]+\]\(\)" -n {} && echo {}'` to find modification candidates.
cc srowen
## How was this patch tested?
existing tests
Author: Zheng RuiFeng <ruifengz@foxmail.com>
Closes #15564 from zhengruifeng/avoid_0_length_array.
Diffstat (limited to 'build')
0 files changed, 0 insertions, 0 deletions