From 9369251a532ab2500e8166b8bc978e493a44308a Mon Sep 17 00:00:00 2001 From: Zack Beach Date: Sun, 7 Jun 2020 19:27:38 -0400 Subject: [PATCH] Add support for new route name format --- src/main/java/main/Route.java | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/main/java/main/Route.java b/src/main/java/main/Route.java index 3640879..4664e55 100644 --- a/src/main/java/main/Route.java +++ b/src/main/java/main/Route.java @@ -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} */