Skip to content

Commit

Permalink
Merge pull request #230 from conveyal/dev
Browse files Browse the repository at this point in the history
Bug fix release
  • Loading branch information
landonreed authored May 2, 2019
2 parents ba9e195 + f1c46da commit 022b5d4
Show file tree
Hide file tree
Showing 24 changed files with 11 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ before_install: |
# Install semantic-release
before_script:
- yarn global add @conveyal/maven-semantic-release semantic-release
- yarn global add @conveyal/maven-semantic-release semantic-release@15

# Replace Travis's default build step.
# Run all Maven phases at once up through verify, install, and deploy.
Expand Down
6 changes: 4 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,14 @@
<groupId>org.hamcrest</groupId>
<artifactId>java-hamcrest</artifactId>
<version>2.0.0.0</version>
<scope>test</scope>
</dependency>
<!-- Snapshotting library for testing -->
<dependency>
<groupId>com.github.Zenika</groupId>
<groupId>com.github.conveyal</groupId>
<artifactId>java-snapshot-matcher</artifactId>
<version>7e6ed4049eb637334e56f84bdd23ea74da05f141</version>
<version>3495b32f7b4d3f82590e0a2284029214070b6984</version>
<scope>test</scope>
</dependency>
<!-- Disk-backed storage that looks like a Java map. -->
<dependency>
Expand Down
8 changes: 6 additions & 2 deletions src/main/java/com/conveyal/gtfs/loader/Field.java
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,6 @@ public String getSqlDeclaration() {
return String.join(" ", name, getSqlTypeName());
}

// TODO test for input with tabs, newlines, carriage returns, and slashes in it.
protected static ValidateFieldResult<String> cleanString (String string) {
return cleanString(new ValidateFieldResult<>(string));
}
Expand All @@ -106,7 +105,12 @@ protected static ValidateFieldResult<String> cleanString (ValidateFieldResult<St
result.clean = result.clean.replace(illegalChar.illegalSequence, illegalChar.replacement);
// We don't know the Table or line number here, but when the errors bubble up, these values should be
// assigned to the errors.
result.errors.add(NewGTFSError.forFeed(NewGTFSErrorType.ILLEGAL_FIELD_VALUE, illegalChar.description));
if (!illegalChar.illegalSequence.equals("\\")) {
// Do not include error entry for unescaped backslash. While this character
// sequence is problematic for Postgres, it is not technically an illegal
// value according to the GTFS specification.
result.errors.add(NewGTFSError.forFeed(NewGTFSErrorType.ILLEGAL_FIELD_VALUE, illegalChar.description));
}
}
}
return result;
Expand Down

0 comments on commit 022b5d4

Please sign in to comment.