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");
|
return ResponseEntity.status(400).body("The scanned station isnt a part of the cache");
|
||||||
}
|
}
|
||||||
|
|
||||||
int i = 0;
|
int i = cache.getStationen().indexOf(station);
|
||||||
for (Station station1 : cache.getStationen()) {
|
|
||||||
if (station1.equals(station)) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
i++;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (cache.getStationen().get(i - 1).equals(aktuelleStation)) {
|
if (cache.getStationen().get(i - 1).equals(aktuelleStation)) {
|
||||||
bearbeitet.setAktuelleStation(station);
|
bearbeitet.setAktuelleStation(station);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user