You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by "MartinWitt (via GitHub)" <gi...@apache.org> on 2023/03/11 15:34:51 UTC

[GitHub] [gora] MartinWitt opened a new pull request, #279: Refactor bad smells:

MartinWitt opened a new pull request, #279:
URL: https://github.com/apache/gora/pull/279

   - ToArrayCallWithZeroLengthArrayArgument
   The performance of the empty array version is the same, and sometimes even better, compared
   to the pre-sized version. Also, passing a pre-sized array is dangerous for a concurrent or
   synchronized collection as a data race is possible between the <code>size</code> and <code>toArray</code>
   calls. This may result in extra <code>null</code>s at the end of the array if the collection was concurrently
   shrunk during the operation.</p>
   See https://shipilev.net/blog/2016/arrays-wisdom-ancients/ for more details.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscribe@gora.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org