[
https://issues.apache.org/jira/browse/GEODE-7213?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16931830#comment-16931830
]
ASF subversion and git services commented on GEODE-7213:
--------------------------------------------------------
Commit 97e1d1907bde63fb0053f5605dbb1113a418e106 in geode's branch
refs/heads/develop from Naburun Nag
[ https://gitbox.apache.org/repos/asf?p=geode.git;h=97e1d19 ]
GEODE-7213: Initialization of arrays with size 0
* Non zero size requirement for array initialization is not a
requirement post JDK6
* Zero size is considered more efficient.
* toArray(new T[0]) is considered faster, safer and contractually
cleaner.
> Zero-sized array for toArray() is recommended in modern JDK
> -----------------------------------------------------------
>
> Key: GEODE-7213
> URL: https://issues.apache.org/jira/browse/GEODE-7213
> Project: Geode
> Issue Type: Bug
> Reporter: nabarun
> Priority: Major
> Time Spent: 20m
> Remaining Estimate: 0h
>
> pre-defined array size for allocation was a requirement in pre-JDK6 era.
> {{toArray(new T[0])}} seems faster, safer, and contractually cleaner, and
> therefore should be the default choice now.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)