Movatterモバイル変換


[0]ホーム

URL:


CodeQL documentation
CodeQL resources

Inconsistent synchronization of getter and setter

ID: java/unsynchronized-getterKind: problemSecurity severity: Severity: errorPrecision: very-highTags:   - quality   - reliability   - concurrency   - language-features   - external/cwe/cwe-413   - external/cwe/cwe-662Query suites:   - java-security-and-quality.qls

Click to see the query in the CodeQL repository

If a class has a synchronizedset method and a similarly-namedget method is not also synchronized, calls to theget method may not return a consistent state for the object.

Recommendation

Synchronize read operations as well as write operations. You should usually synchronize theget method.

References


[8]ページ先頭

©2009-2025 Movatter.jp