reworked checks to work with double instead of Double
This commit is contained in:
parent
6cf52503bc
commit
5bf05616c8
@ -156,7 +156,7 @@ public class Controller {
|
||||
}
|
||||
}
|
||||
|
||||
if (cache.getDescription().length() == 0 || cache.getName().length() == 0 || Double.valueOf(cache.getRankingPoints()) == null || cache.getStationen().size() == 0) {
|
||||
if (cache.getDescription().length() == 0 || cache.getName().length() == 0 || cache.getRankingPoints() == 0.0 || cache.getStationen().size() == 0) {
|
||||
deleteStationen(cache);
|
||||
return ResponseEntity.status(400).body("cache fields can´t be empty");
|
||||
}
|
||||
@ -188,7 +188,7 @@ public class Controller {
|
||||
|
||||
public ResponseEntity createStation(Station station) {
|
||||
|
||||
if (station.getDescription().length() == 0 || Double.valueOf(station.getLattitude()) == null || Double.valueOf(station.getLongitude()) == null || station.getSolution().length() == 0) {
|
||||
if (station.getDescription().length() == 0 || station.getLattitude() == 0.0 || station.getLongitude() == 0.0 || station.getSolution().length() == 0) {
|
||||
return ResponseEntity.status(400).body("station fields can´t be empty");
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user