static AutoCloseable tempLock(final Lock lock) { if (lock == null) null; lock(lock); ret autoCloseable { unlock(lock); }; }