mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-25 21:43:49 +00:00
fixed handling of InterruptedException; must not call interrupt() on current thread because it causes endless InterruptedException
This commit is contained in:
1 parent
3e1b5501a2
commit
68f3122be4
1 file changed
+2
-3
+2
-3
@@ -9,6 +9,7 @@ import java.util.concurrent.TimeUnit;
|
||||
import java.util.concurrent.locks.Lock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock;
|
||||
import java.util.concurrent.locks.ReentrantReadWriteLock.ReadLock;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
|
||||
import com.sap.sailing.domain.common.TimePoint;
|
||||
@@ -400,9 +401,7 @@ public class LockUtil {
|
||||
logger.info(message.toString());
|
||||
}
|
||||
} catch (InterruptedException ex) {
|
||||
// re-assert interrupt state that occurred while we
|
||||
// were acquiring the lock
|
||||
Thread.currentThread().interrupt();
|
||||
logger.log(Level.WARNING, "Interrupted while waiting for lock "+lockDescriptionForTimeoutLogMessage, ex);
|
||||
}
|
||||
return locked;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user