style: include LII_LIST_INDEXED_ITERATING
(#5190)
This commit is contained in:
parent
2cda944643
commit
d2bfb100b2
@ -141,9 +141,6 @@
|
||||
<Match>
|
||||
<Bug pattern="TR_TAIL_RECURSION" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="LII_LIST_INDEXED_ITERATING" />
|
||||
</Match>
|
||||
<Match>
|
||||
<Bug pattern="USBR_UNNECESSARY_STORE_BEFORE_RETURN" />
|
||||
</Match>
|
||||
|
@ -40,8 +40,8 @@ public class FCFSScheduling {
|
||||
}
|
||||
|
||||
private void evaluateTurnAroundTime() {
|
||||
for (int i = 0; i < processes.size(); i++) {
|
||||
processes.get(i).setTurnAroundTimeTime(processes.get(i).getBurstTime() + processes.get(i).getWaitingTime());
|
||||
for (final var process : processes) {
|
||||
process.setTurnAroundTimeTime(process.getBurstTime() + process.getWaitingTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -95,6 +95,8 @@ public class RRScheduling {
|
||||
}
|
||||
|
||||
private void evaluateWaitingTime() {
|
||||
for (int i = 0; i < processes.size(); i++) processes.get(i).setWaitingTime(processes.get(i).getTurnAroundTimeTime() - processes.get(i).getBurstTime());
|
||||
for (final var process : processes) {
|
||||
process.setWaitingTime(process.getTurnAroundTimeTime() - process.getBurstTime());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user