Movatterモバイル変換


[0]ホーム

URL:


CodeQL documentation
CodeQL resources

Non-synchronized override of synchronized method

ID: java/non-sync-overrideKind: problemSecurity severity: Severity: warningPrecision: very-highTags:   - quality   - reliability   - concurrency   - language-features   - external/cwe/cwe-820Query suites:   - java-security-and-quality.qls

Click to see the query in the CodeQL repository

If a synchronized method is overridden in a subclass, the compiler does not require the overriding method to be synchronized. However, if the overriding method is not synchronized, the thread-safety of the subclass may be broken.

Recommendation

Ensure that the overriding method is synchronized, if necessary.

References


[8]ページ先頭

©2009-2025 Movatter.jp