[FIXES JENKINS-23629] NPE with ReentrantLock