diff options
author | Robert Wertman <robert.wertman@gmail.com> | 2019-01-27 00:39:30 -0500 |
---|---|---|
committer | Roel Spilker <r.spilker@gmail.com> | 2019-01-28 20:44:53 +0100 |
commit | f2d03973d59d96d8bfef51d8378a4069d8d46205 (patch) | |
tree | d3d75b5fbca4e64d5ee967f3ec90b547019e89fd /src/core/lombok/javac | |
parent | ccd802503d8aa578be3f1f956d97b06a803de0aa (diff) | |
download | lombok-f2d03973d59d96d8bfef51d8378a4069d8d46205.tar.gz lombok-f2d03973d59d96d8bfef51d8378a4069d8d46205.tar.bz2 lombok-f2d03973d59d96d8bfef51d8378a4069d8d46205.zip |
Replace sized array in toArray with 0
This approach has been benchmarked to be marginally faster.
Fixes #2030.
Diffstat (limited to 'src/core/lombok/javac')
-rwxr-xr-x[-rw-r--r--] | src/core/lombok/javac/handlers/HandleHelper.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/lombok/javac/handlers/HandleHelper.java b/src/core/lombok/javac/handlers/HandleHelper.java index 09ace4d6..6f4361c1 100644..100755 --- a/src/core/lombok/javac/handlers/HandleHelper.java +++ b/src/core/lombok/javac/handlers/HandleHelper.java @@ -102,7 +102,7 @@ public class HandleHelper extends JavacAnnotationHandler<Helper> { } Collections.sort(knownMethodNames); - final String[] knownMethodNames_ = knownMethodNames.toArray(new String[knownMethodNames.size()]); + final String[] knownMethodNames_ = knownMethodNames.toArray(new String[0]); final Name helperName = annotationNode.toName("$" + annotatedType_.name); final boolean[] helperUsed = new boolean[1]; |