Skip to content

refactor: simplify GTFS entity container parameterization - #2180

Open
mackenziereading19 wants to merge 1 commit into
MobilityData:masterfrom
mackenziereading19:1865-simplify-entity-container
Open

refactor: simplify GTFS entity container parameterization#2180
mackenziereading19 wants to merge 1 commit into
MobilityData:masterfrom
mackenziereading19:1865-simplify-entity-container

Conversation

@mackenziereading19

Copy link
Copy Markdown

Summary

Simplifies GtfsEntityContainer by removing the unnecessary descriptor type parameter.

GtfsEntityContainer<T, D> stored the descriptor as D, but callers only rely on the base GtfsFileDescriptor API. This change reduces it to GtfsEntityContainer<T> while preserving the descriptor-specific generic on GtfsTableContainer<T, D>, where it is still useful.

Fixes #1865.

Changes

  • remove D extends GtfsFileDescriptor from GtfsEntityContainer;
  • store and expose the descriptor as GtfsFileDescriptor;
  • update affected container, loader, validator-provider, report-summary, GeoJSON, and translation references;
  • preserve GtfsTableContainer<T, D> and its table-descriptor typing.

Validation

  • :core:compileJava — pass
  • :main:compileJava — pass
  • :core:test — pass
  • targeted FeedMetadataTest — pass
  • targeted TranslationFieldAndReferenceValidatorTest — pass
  • :core:spotlessCheck :main:spotlessCheck — pass
  • git diff --check — pass
  • no remaining two-argument GtfsEntityContainer<..., ...> references

Full :main:test completed 678 tests with 3 failures. The failures are the existing Mockito initialization failures in:

  • JsonReportSummaryGeneratorTest.withFeedMetadataWithConfigTest
  • JsonReportSummaryGeneratorTest.withFeedMetadataNoConfigTest
  • VersionResolverTest

These failures reproduce on the untouched baseline and are unrelated to this refactor.

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.

Technical debt: Simplify some classes parameterization

1 participant