Query module NonSynchronizedOverride

name
Non-synchronized override of synchronized method
description
If a synchronized method is overridden in a subclass, and the overriding method is not synchronized, the thread-safety of the subclass may be broken.
kind
problem
problem.severity
warning
precision
very-high
id
java/non-sync-override
tags
reliability correctness concurrency language-features external/cwe/cwe-820

Imports

java

Provides all default Java QL imports.

Predicates

delegatingOverride

Check whether method sub is a trivial override of method sup that simply delegates to sup.

delegatingSuperCall

Check whether expression e is a call to method target of the form super.m(x, y, z), possibly wrapped in one or more casts and/or parentheses.