Skip to content

Commit

Permalink
Merge pull request #202 from HSLdevcom/fix-default-request-and-bikes
Browse files Browse the repository at this point in the history
Fix compactLegsByReversedSearch default value and updaters crashing
  • Loading branch information
pailakka authored Apr 26, 2018
2 parents 18e14e8 + 4764495 commit 441b00e
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,6 @@ public IndexGraphQLSchema(GraphIndex index) {
.name("compactLegsByReversedSearch")
.description("Whether legs should be compacted by performing a reversed search. Experimental argument, will be removed!.")
.type(Scalars.GraphQLBoolean)
.defaultValue(true)
.build())
.dataFetcher(environment -> new GraphQlPlanner(index).plan(environment))
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ public class RoutingRequest implements Cloneable, Serializable {
/**
* When true, do a full reversed search to compact the legs of the GraphPath.
*/
public boolean compactLegsByReversedSearch = false;
public boolean compactLegsByReversedSearch = true;

/**
* If true, cost turns as they would be in a country where driving occurs on the right; otherwise, cost them as they would be in a country where
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/opentripplanner/routing/graph/Graph.java
Original file line number Diff line number Diff line change
Expand Up @@ -753,7 +753,7 @@ public static Graph load(ObjectInputStream in, LoadLevel level,
// vertex list is transient because it can be reconstructed from edges
LOG.debug("Loading edges...");
List<Edge> edges = (ArrayList<Edge>) in.readObject();
graph.vertices = new HashMap<String, Vertex>();
graph.vertices = new ConcurrentHashMap<String, Vertex>();

for (Edge e : edges) {
graph.vertices.put(e.getFromVertex().getLabel(), e.getFromVertex());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ private void handleRequest(GenericLocation from, GenericLocation to, GenericLoca
request.maxTransfers = 4;
request.from = from;
request.to = to;
request.compactLegsByReversedSearch = false;
for (GenericLocation intermediateLocation : via) {
request.addIntermediatePlace(intermediateLocation);
}
Expand Down

0 comments on commit 441b00e

Please sign in to comment.