LPS-37190: synchronized method with race condition potential

LPS-37190: synchronized method with race condition potential