Skip to content

Commit 41d3207

Browse files
committed
for round_trip misusage use IllegalArgumentException
1 parent bbfe3df commit 41d3207

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

core/src/main/java/com/graphhopper/routing/template/RoundTripRoutingTemplate.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public RoundTripRoutingTemplate(GHRequest request, GHResponse ghRsp, LocationInd
6868
@Override
6969
public List<QueryResult> lookup(List<GHPoint> points, FlagEncoder encoder) {
7070
if (points.size() != 1 || ghRequest.getPoints().size() != 1)
71-
throw new IllegalStateException("For round trip calculation exactly one point is required");
71+
throw new IllegalArgumentException("For round trip calculation exactly one point is required");
7272
final double distanceInMeter = ghRequest.getHints().getDouble(RoundTrip.DISTANCE, 10000);
7373
final long seed = ghRequest.getHints().getLong(RoundTrip.SEED, 0L);
7474
double initialHeading = ghRequest.getFavoredHeading(0);

0 commit comments

Comments
 (0)