CodeQL documentation

Wait on condition

ID: java/wait-on-condition-interface
Kind: problem
Security severity: 
Severity: error
Precision: medium
Tags:
   - reliability
   - correctness
   - concurrency
   - external/cwe/cwe-662
Query suites:
   - java-security-and-quality.qls

Click to see the query in the CodeQL repository

Calling wait on an object of type java.util.concurrent.locks.Condition may result in unexpected behavior because wait is a method of the Object class, not the Condition interface itself. Such a call is probably a typographical error: typing “wait” instead of “await”.

Recommendation

Instead of Object.wait, use one of the Condition.await methods.

References

  • © GitHub, Inc.
  • Terms
  • Privacy
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy