Skip to content

Commit

Permalink
Merge pull request #12 from radford-transit/route-names
Browse files Browse the repository at this point in the history
Add support for new route name format
  • Loading branch information
zbeach authored Jun 7, 2020
2 parents 4ae0156 + 9369251 commit fea042c
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 fea042c

Please sign in to comment.