We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking issue reported in https://github.com/SCADA-LTS/Scada-LTS/security/code-scanning/2166
The text was updated successfully, but these errors were encountered:
There is an unlock in the code in block finally :
public boolean cancel() { synchronized (lock) { boolean result = (state == SCHEDULED); if (completeBeforeCancel) { try { cancelLock.writeLock().lock(); state = CANCELLED; } finally { cancelLock.writeLock().unlock(); } } else state = CANCELLED; return result; } }
cancelLock.writeLock().unlock();
The only thing that could be slightly improved here is to throw lock() out of try: https://docs.oracle.com/javase%2F7%2Fdocs%2Fapi%2F%2F/java/util/concurrent/locks/ReentrantReadWriteLock.html
Sorry, something went wrong.
#2634 Fix possible Unreleased lock - Lock outside the try block
ba74234
Merge pull request #2646 from SCADA-LTS/fix/#2634_Fix_possible_Unrele…
a936ae4
…ased_lock #2634 Fix possible Unreleased lock - Lock outside the try block
Limraj
No branches or pull requests
Tracking issue reported in https://github.com/SCADA-LTS/Scada-LTS/security/code-scanning/2166
The text was updated successfully, but these errors were encountered: