1
0
Fork 0
mirror of https://github.com/graphhopper/jsprit.git synced 2020-01-24 07:45:05 +01:00

prevent casting of non-job activities to JobActivity

This commit is contained in:
Michal Maciejewski 2018-08-20 23:31:38 +02:00
parent 90a8edaa6d
commit d4106fb6d0
No known key found for this signature in database
GPG key ID: 015947E60A2AD77B
2 changed files with 27 additions and 21 deletions

View file

@ -104,6 +104,10 @@ public final class RuinWorst extends AbstractRuinStrategy {
TourActivity actBefore = route.getStart();
TourActivity actToEval = null;
for (TourActivity act : route.getActivities()) {
if (!(act instanceof TourActivity.JobActivity)) {
continue;
}
if (actToEval == null) {
actToEval = act;
continue;