diff --git a/pom.xml b/pom.xml
index a2b50bf6c..48d4063dc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -296,7 +296,7 @@
com.amazonaws
aws-java-sdk-s3
- 1.12.261
+ 1.11.18
diff --git a/src/main/java/com/conveyal/gtfs/loader/JdbcTableWriter.java b/src/main/java/com/conveyal/gtfs/loader/JdbcTableWriter.java
index a967f0f96..86ee2c771 100644
--- a/src/main/java/com/conveyal/gtfs/loader/JdbcTableWriter.java
+++ b/src/main/java/com/conveyal/gtfs/loader/JdbcTableWriter.java
@@ -1483,6 +1483,11 @@ private String[] parseExceptionListField(int id, String namespace, Table table,
return parsedString.replaceAll("[{}]", "").split("[,]", 0);
}
+ private String getResultSetString(int column, ResultSet resultSet) throws java.sql.SQLException {
+ String resultSetString = resultSet.getString(column);
+ return resultSetString == null ? "" : resultSetString;
+ }
+
/**
* Delete all entries in calendar dates associated with a schedule exception.
*/
@@ -1579,7 +1584,7 @@ private void updateReferencingTables(
connection.rollback();
if (entityClass.getSimpleName().equals("Stop")) {
String patternStopLookup = String.format(
- "select distinct p.id, r.id " +
+ "select distinct p.id, r.id, r.route_short_name, r.route_id " +
"from %s.pattern_stops ps " +
"inner join " +
"%s.patterns p " +
@@ -1599,7 +1604,12 @@ private void updateReferencingTables(
ResultSet resultSet = patternStopSelectStatement.getResultSet();
while (resultSet.next()) {
patternAndRouteIds.add(
- "{" + resultSet.getString(1) + "-" + resultSet.getString(2) + "}"
+ String.format("{%s-%s-%s-%s}",
+ getResultSetString(1, resultSet),
+ getResultSetString(2, resultSet),
+ getResultSetString(3, resultSet),
+ getResultSetString(4, resultSet)
+ )
);
}
}