Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate registries of tables and validators #1290

Merged
merged 1 commit into from
Nov 10, 2022

Conversation

aababilov
Copy link
Collaborator

@aababilov aababilov commented Nov 9, 2022

Do not use the potentially unsafe ClassPath library that requires a lot of permissions and is problematic to run in a secure sandbox.

This is an API change.
Old code.

validatorLoader = ValidatorLoader.createForDefaultPackage();
feedLoader = new GtfsFeedLoader();

New code.

validatorLoader = ValidatorLoader.createFromRegistry(new DefaultValidatorRegistry());
feedLoader = new GtfsFeedLoader(new DefaultTableRegistry());

ValidatorLoader.createForPackages is removed. Create a custom implementation of GtfsValidatorRegistry and call ValidatorLoader.createFromRegistry.

We are still using ClassPath in NoticeSchemaGenerator and VersionResolver. They are not used for validation.

Do not use the potentially unsafe ClassPath library that requires a lot
of permissions and is problematic to run in a secure sandbox.

We are still using ClassPath in NoticeSchemaGenerator. This can be
changed later.
Copy link
Collaborator

@asvechnikov2 asvechnikov2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Thanks!

@aababilov aababilov merged commit 7fb105e into MobilityData:master Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants