fantapsody opened a new pull request #10742: URL: https://github.com/apache/pulsar/pull/10742
It's recommended that calls to Lock#lock should be immediately followed by a `try` block with a `finally` clause which releases the lock. I came across a few pieces of code that didn't follow this pattern and try to fix it for consistency. References: https://errorprone.info/bugpattern/LockNotBeforeTry https://docs.oracle.com/javase/8/docs/api/java/util/concurrent/locks/ReentrantLock.html -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
