You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by GitBox <gi...@apache.org> on 2023/01/06 09:01:11 UTC

[GitHub] [rocketmq-connect] MartinWitt opened a new pull request, #409: refactor: refactor bad smell ToArrayCallWithZeroLengthArrayArgument

MartinWitt opened a new pull request, #409:
URL: https://github.com/apache/rocketmq-connect/pull/409

   # Repairing Code Style Issues
   <!-- laughing-train-refactor -->
   ## 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.
   
   <!-- fingerprint:595300799 -->
   # Repairing Code Style Issues
   * ToArrayCallWithZeroLengthArrayArgument (1)
   


-- 
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: commits-unsubscribe@rocketmq.apache.org

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


[GitHub] [rocketmq-connect] sunxiaojian merged pull request #409: refactor: refactor bad smell ToArrayCallWithZeroLengthArrayArgument

Posted by "sunxiaojian (via GitHub)" <gi...@apache.org>.
sunxiaojian merged PR #409:
URL: https://github.com/apache/rocketmq-connect/pull/409


-- 
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: commits-unsubscribe@rocketmq.apache.org

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