@@ -195,9 +195,8 @@ protected List<Path> routeAlt(GHRequest request, GHResponse ghRsp, AlgorithmOpti
195
195
// each path represents a different alternative and we do the path merging for each of them
196
196
PathMerger pathMerger = createPathMerger (request , weighting , queryGraph );
197
197
for (Path path : result .paths ) {
198
- ResponsePath responsePath = new ResponsePath ();
199
- responsePath .setWaypoints (getWaypoints (qResults ));
200
- pathMerger .doWork (responsePath , Collections .singletonList (path ), encodingManager , translationMap .getWithFallBack (request .getLocale ()));
198
+ PointList waypoints = getWaypoints (qResults );
199
+ ResponsePath responsePath = pathMerger .doWork (waypoints , Collections .singletonList (path ), encodingManager , translationMap .getWithFallBack (request .getLocale ()));
201
200
ghRsp .add (responsePath );
202
201
}
203
202
ghRsp .getHints ().putObject ("visited_nodes.sum" , result .visitedNodes );
@@ -305,11 +304,8 @@ private PathMerger createPathMerger(GHRequest request, Weighting weighting, Grap
305
304
}
306
305
307
306
private ResponsePath concatenatePaths (GHRequest request , Weighting weighting , QueryGraph queryGraph , List <Path > paths , PointList waypoints ) {
308
- ResponsePath responsePath = new ResponsePath ();
309
- responsePath .setWaypoints (waypoints );
310
307
PathMerger pathMerger = createPathMerger (request , weighting , queryGraph );
311
- pathMerger .doWork (responsePath , paths , encodingManager , translationMap .getWithFallBack (request .getLocale ()));
312
- return responsePath ;
308
+ return pathMerger .doWork (waypoints , paths , encodingManager , translationMap .getWithFallBack (request .getLocale ()));
313
309
}
314
310
315
311
private PointList getWaypoints (List <QueryResult > queryResults ) {
0 commit comments