| Severity | 2 |
|---|---|
| Enabled | yes |
| Waivable | |
| Violation |
public void run() {
try {
while (true) {
if (!working) {
sleep(TIMEOUT);
}
}
} catch (InterruptedException e) {
logger.debug(STOP_TXT);
}
}
|
| Fix |
public void run() {
try {
while (working) {
wait(TIMEOUT);
}
} catch (InterruptedException e) {
logger.debug(STOP_TXT);
}
}
|