simplified code

This commit is contained in:
Michael 2019-04-17 08:07:44 +02:00
parent 3d10c6a906
commit 57f7cd4164

View File

@ -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);