Get an old pool in a synchronized block

It has race condition if it is placed outside of the block.