- private void initialize() {
- if(!initialized.compareAndSet(false, true)) {
- return;
- }
+ // synchronize this method so that, in case of concurrent access to getAndRemove(),
+ // no one ends up with partially initialized data
+ @SuppressWarnings("checkstyle:IllegalCatch")
+ private synchronized void initialize() {