Skip to content

Commit

Permalink
Fixed #4319. fixed issue where network matcher was set properly (#4320)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobby Simic authored Oct 19, 2020
1 parent 2ac53ac commit 1d9f0b1
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ else if (conflationCommand != null && conflationCommand.contains("differential")
List<String> matchCreators;
List<String> mergerCreators;

// SPECIAL CASE: if network order networkAlgorithm.conf
if ("Network".equals(conflationType)) {
// SPECIAL CASE: if network, use order networkAlgorithm.conf
if ("Network".equals(conflationType) || "Network".equals(conflationAlgorithm)) {
JSONParser parser = new JSONParser();
try (FileReader fileReader = new FileReader(new File(HOME_FOLDER, NETWORK_CONFLATION_PATH))) {
JSONObject networkConfigJson = (JSONObject) parser.parse(fileReader);
Expand All @@ -213,7 +213,7 @@ else if (conflationCommand != null && conflationCommand.contains("differential")
throw new RuntimeException("Error reading NetworkAlgorithm.conf file", ioe);
}
} else {
// These 2 lists are in the proper order so we will us this to sort our matchers and mergers list
// These 2 lists are in the proper order so we will use this to sort our matchers and mergers list
matchCreators = new ArrayList<>(Arrays.asList(configOptions.get("MatchCreators").get("default").split(";")));
mergerCreators = new ArrayList<>(Arrays.asList(configOptions.get("MergerCreators").get("default").split(";")));
}
Expand All @@ -226,7 +226,7 @@ else if (conflationCommand != null && conflationCommand.contains("differential")
String current = matchCreators.get(i);

// Special case for network
if (current.equals("hoot::NetworkMatchCreator") && matchers.contains("hoot::HighwayMatchCreator")) {
if (current.equals("hoot::NetworkMatchCreator") && (matchers.contains("hoot::HighwayMatchCreator") || matchers.contains("hoot::NetworkMatchCreator"))) {
sortedMatchers.add("hoot::NetworkMatchCreator");
sortedMergers.add("hoot::NetworkMergerCreator");
}
Expand Down

0 comments on commit 1d9f0b1

Please sign in to comment.