From 1aa9b21a447e09ccf8198a21701966efbdf1b930 Mon Sep 17 00:00:00 2001
From: marecabo <23156476+marecabo@users.noreply.github.com>
Date: Wed, 13 Mar 2024 09:58:14 +0100
Subject: [PATCH] Tiny code lint
---
.../java/org/matsim/contrib/drt/extension/fiss/FISS.java | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/fiss/FISS.java b/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/fiss/FISS.java
index 9dbd91f2f0a..6ce932ecebc 100644
--- a/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/fiss/FISS.java
+++ b/contribs/drt-extensions/src/main/java/org/matsim/contrib/drt/extension/fiss/FISS.java
@@ -101,7 +101,7 @@ public boolean handleDeparture(double now, MobsimAgent agent, Id linkId) {
// update travel time with travel times of last iteration
double newTravelTime = 0.0;
- // start and end link are not consideres in NetworkRoutingModule for travel time
+ // start and end link are not considered in NetworkRoutingModule for travel time
for (Id routeLinkId : networkRoute.getLinkIds()) {
newTravelTime += this.travelTime.getLinkTravelTime(network.getLinks().get(routeLinkId),
now + newTravelTime, person, vehicle);
@@ -112,8 +112,8 @@ public boolean handleDeparture(double now, MobsimAgent agent, Id linkId) {
}
// remove vehicle of teleported agent from parking spot
QVehicle removedVehicle = null;
- if (agent instanceof MobsimDriverAgent) {
- Id vehicleId = ((MobsimDriverAgent) agent).getPlannedVehicleId();
+ if (agent instanceof MobsimDriverAgent driverAgent) {
+ Id vehicleId = driverAgent.getPlannedVehicleId();
QVehicle vehicle = qNetsimEngine.getVehicles().get(vehicleId);
QLinkI qLinkI = (QLinkI) this.qNetsimEngine.getNetsimNetwork().getNetsimLink(linkId);
removedVehicle = qLinkI.removeParkedVehicle(vehicleId);