|
26 | 26 | import com.graphhopper.util.EdgeExplorer;
|
27 | 27 | import com.graphhopper.util.EdgeIterator;
|
28 | 28 |
|
29 |
| -import java.util.*; |
| 29 | +import java.util.Arrays; |
| 30 | +import java.util.Collection; |
| 31 | +import java.util.Collections; |
| 32 | +import java.util.List; |
30 | 33 |
|
31 | 34 | import static com.graphhopper.routing.util.EncodingManager.getKey;
|
32 | 35 |
|
@@ -63,8 +66,8 @@ else if (name.contains("truck"))
|
63 | 66 | else if (name.contains("bike") || name.contains("bicycle"))
|
64 | 67 | this.restrictions = Arrays.asList("bicycle", "vehicle", "access");
|
65 | 68 | else
|
66 |
| - throw new IllegalArgumentException("restrictions collection must be specified for parser " + name |
67 |
| - + ", e.g. [\"motorcar\", \"motor_vehicle\", \"vehicle\", \"access\"]"); |
| 69 | + // assume default is some motor_vehicle, exception is too strict |
| 70 | + this.restrictions = Arrays.asList("motor_vehicle", "vehicle", "access"); |
68 | 71 | } else {
|
69 | 72 | this.restrictions = restrictions;
|
70 | 73 | }
|
@@ -107,7 +110,7 @@ EdgeExplorer getOutExplorer(Graph graph) {
|
107 | 110 | * @return a collection of turn cost entries which can be used for testing
|
108 | 111 | */
|
109 | 112 | void addRelationToTCStorage(OSMTurnRelation osmTurnRelation, IntsRef turnCostFlags,
|
110 |
| - ExternalInternalMap map, Graph graph) { |
| 113 | + ExternalInternalMap map, Graph graph) { |
111 | 114 | TurnCostStorage tcs = graph.getTurnCostStorage();
|
112 | 115 | int viaNode = map.getInternalNodeIdOfOsmNode(osmTurnRelation.getViaOsmNodeId());
|
113 | 116 | EdgeExplorer edgeOutExplorer = getOutExplorer(graph), edgeInExplorer = getInExplorer(graph);
|
|
0 commit comments