From b398ce17960969cf45ee27dda354410efef7b0bb Mon Sep 17 00:00:00 2001 From: Lukas Connolly Date: Fri, 23 Aug 2024 09:29:23 +0200 Subject: [PATCH] STYLE: NAV-131 - Add assert to prevent IDE complaining. --- src/main/java/ch/naviqore/app/controller/RoutingController.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/ch/naviqore/app/controller/RoutingController.java b/src/main/java/ch/naviqore/app/controller/RoutingController.java index 53c960ab..e6894808 100644 --- a/src/main/java/ch/naviqore/app/controller/RoutingController.java +++ b/src/main/java/ch/naviqore/app/controller/RoutingController.java @@ -101,6 +101,7 @@ public List getConnections(@RequestParam(required = false) String so } else if (targetStop != null) { return map(service.getConnections(sourceCoordinate, targetStop, dateTime, map(timeType), config)); } else { + assert sourceCoordinate != null; // never happens --> see RoutingRequestValidator.validateStopParameters RoutingRequestValidator.validateCoordinates(sourceCoordinate, targetCoordinate); return map(service.getConnections(sourceCoordinate, targetCoordinate, dateTime, map(timeType), config)); }