I was just wondering if there is a difference between the classic:
lock.lock();try { //I have the lock! } finally { lock.unlock(); }
And the Autocloseable version:
lock.lock();try (AutoCloseable auto = lock::unlock) { //I have the lock! }