simplified code
This commit is contained in:
parent
3d10c6a906
commit
57f7cd4164
@ -231,13 +231,8 @@ public class Controller {
|
||||
return ResponseEntity.status(400).body("The scanned station isnt a part of the cache");
|
||||
}
|
||||
|
||||
int i = 0;
|
||||
for (Station station1 : cache.getStationen()) {
|
||||
if (station1.equals(station)) {
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
int i = cache.getStationen().indexOf(station);
|
||||
|
||||
|
||||
if (cache.getStationen().get(i - 1).equals(aktuelleStation)) {
|
||||
bearbeitet.setAktuelleStation(station);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user