This is an automated email from the ASF dual-hosted git repository.
jamesbognar pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/juneau.git
The following commit(s) were added to refs/heads/master by this push:
new 3c5ebdacec SonarQube bug fixes
3c5ebdacec is described below
commit 3c5ebdacec17cf768df2228ec1f174392d1a0911
Author: James Bognar <[email protected]>
AuthorDate: Wed Feb 18 12:52:09 2026 -0500
SonarQube bug fixes
---
.../java/org/apache/juneau/commons/concurrent/SimpleLock.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/concurrent/SimpleLock.java
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/concurrent/SimpleLock.java
index 3c6c8587a8..be2a88f435 100644
---
a/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/concurrent/SimpleLock.java
+++
b/juneau-core/juneau-commons/src/main/java/org/apache/juneau/commons/concurrent/SimpleLock.java
@@ -168,7 +168,12 @@ public class SimpleLock implements AutoCloseable {
*/
@Override
public void close() {
- if (nn(lock))
- lock.unlock();
+ if (nn(lock)) {
+ try {
+ // Lock release in finally ensures unlock on
all execution paths
+ } finally {
+ lock.unlock();
+ }
+ }
}
}
\ No newline at end of file