Skip to content

Commit

Permalink
Add support for new route name format
Browse files Browse the repository at this point in the history
  • Loading branch information
zbeach committed Jun 7, 2020
1 parent 4ae0156 commit 9369251
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/main/java/main/Route.java
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,14 @@ else if ((!(Character.isDigit(name.charAt(0)) && Character.isDigit(name.charAt(1
* @return
*/
private String getRouteName(String fullName) {
return fullName.substring(5, fullName.length());
// New format - Route ID only
if (fullName.length() < 6) {
return fullName;
}
// Old format - Extract route name
else {
return fullName.substring(5, fullName.length());
}
}

/** {@inheritDoc} */
Expand Down

0 comments on commit 9369251

Please sign in to comment.