fix: null in unit testing
This commit is contained in:
parent
b8fd649ccf
commit
9e2b38e205
2 changed files with 19 additions and 3 deletions
|
|
@ -63,7 +63,7 @@ public class PathFinderService {
|
|||
private final Map<Integer, LngLat> servicePointLocations;
|
||||
private final List<Region> restrictedRegions;
|
||||
|
||||
@Autowired
|
||||
@Autowired(required = false)
|
||||
private TelemetryService telemetryService;
|
||||
|
||||
/**
|
||||
|
|
@ -182,7 +182,9 @@ public class PathFinderService {
|
|||
|
||||
var resp = new DeliveryPathResponse(totalCost, totalMoves, paths.toArray(new DronePath[0]));
|
||||
|
||||
telemetryService.sendEventAsyncByPathResponse(resp, deliveryTimestamps);
|
||||
if (telemetryService != null) {
|
||||
telemetryService.sendEventAsyncByPathResponse(resp, deliveryTimestamps);
|
||||
}
|
||||
|
||||
return resp;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue