cadence-java-client icon indicating copy to clipboard operation
cadence-java-client copied to clipboard

Fix potential concurrent modification in LoggerTest

Open votez opened this issue 2 years ago • 2 comments

votez avatar Sep 27 '23 15:09 votez

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Sep 27 '23 15:09 CLAassistant

Pull Request Test Coverage Report for Build 2014

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.006%) to 60.202%

Totals Coverage Status
Change from base Build 2011: 0.006%
Covered Lines: 11336
Relevant Lines: 18830

💛 - Coveralls

coveralls avatar Oct 10 '23 17:10 coveralls

Gonna close since #885 solves this, so it's no longer needed.

Apologies on the delay! And thanks for the PR regardless, more are welcome and I'll try to check my notifications more regularly (and we've got some more teammates, hopefully that'll help keep a better eye on the various repos going forward).

Groxx avatar Apr 27 '24 00:04 Groxx

it does solves the problem because the ArrayList constructor is thread-safe of ArrayList source. The original ListAppender is backed by ArrayList and the unit test copies it in ArrayList without involving an iterator, thread-safe again.

But I understand the implementation of logback's ListAppender can change without notice and internals of ArrayList constructor is not obvious for everyone so synchronized could pass review in one day and this only causes doubts and misentrpretation...

votez avatar Apr 27 '24 05:04 votez