Modify rule S2274: Improve compliant solution (#2868)
This commit is contained in:
parent
7da41a60be
commit
8ea71addf5
@ -56,7 +56,7 @@ synchronized (obj) {
|
|||||||
while (!suitableCondition()){
|
while (!suitableCondition()){
|
||||||
obj.wait(timeout); // Compliant, the condition is checked in a loop, so the action below will only occur if the condition is true
|
obj.wait(timeout); // Compliant, the condition is checked in a loop, so the action below will only occur if the condition is true
|
||||||
}
|
}
|
||||||
... // Perform action appropriate to condition
|
... // Perform some logic that is appropriate for when the condition is true
|
||||||
}
|
}
|
||||||
----
|
----
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user