Skip to content

Commit

Permalink
refactor: use NewGTFSErrorInterface more consistently
Browse files Browse the repository at this point in the history
  • Loading branch information
miles-grant-ibigroup committed Jul 25, 2023
1 parent 0bca927 commit 6dbe19e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/main/java/com/conveyal/gtfs/validator/Validator.java
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package com.conveyal.gtfs.validator;

import com.conveyal.gtfs.error.NewGTFSError;
import com.conveyal.gtfs.error.NewGTFSErrorInterface;
import com.conveyal.gtfs.error.NewGTFSErrorType;
import com.conveyal.gtfs.error.SQLErrorStorage;
import com.conveyal.gtfs.loader.Feed;
Expand Down Expand Up @@ -33,7 +34,7 @@ public Validator(Feed feed, SQLErrorStorage errorStorage) {
/**
* Store an error that affects a single line of a single table. Wraps the underlying error factory method.
*/
public void registerError(Entity entity, NewGTFSErrorType errorType) {
public void registerError(Entity entity, NewGTFSErrorInterface errorType) {
errorStorage.storeError(NewGTFSError.forEntity(entity, errorType));
}

Expand All @@ -49,7 +50,7 @@ public void storeErrors(Set<NewGTFSError> errors) {
* collection of errors need to be temporarily held before storing in batch (e.g., waiting to store travel time zero
* errors before it is determined that the entire feed uses travel times rounded to the minute).
*/
NewGTFSError createUnregisteredError (Entity entity, NewGTFSErrorType errorType) {
NewGTFSError createUnregisteredError (Entity entity, NewGTFSErrorInterface errorType) {
return NewGTFSError.forEntity(entity, errorType);
}

Expand All @@ -65,7 +66,7 @@ NewGTFSError createUnregisteredError (Entity entity, NewGTFSErrorType errorType)
* Store an error that affects a single line of a single table.
* Add a bad value to it.
*/
public void registerError(Entity entity, NewGTFSErrorType errorType, Object badValue) {
public void registerError(Entity entity, NewGTFSErrorInterface errorType, Object badValue) {
errorStorage.storeError(NewGTFSError.forEntity(entity, errorType).setBadValue(badValue.toString()));
}

Expand Down

0 comments on commit 6dbe19e

Please sign in to comment.