Skip to content

bugfix: NPE when generating TripPatterns in TripPatternCache - #3284

Merged
t2gran merged 5 commits into
opentripplanner:dev-2.xfrom
entur:otp2_npe_trippatterncache
Dec 15, 2020
Merged

bugfix: NPE when generating TripPatterns in TripPatternCache#3284
t2gran merged 5 commits into
opentripplanner:dev-2.xfrom
entur:otp2_npe_trippatterncache

Conversation

@t2gran

@t2gran t2gran commented Dec 8, 2020

Copy link
Copy Markdown
Member

If a RealTime update do not match an existing TripPattern a new one is generated, but there is a NullPointerException in when the new id is generated.

To fix this, the internal model is also cleaned up a bit, by making the directionId a numeric field, not a string. GTFS uses 0 and 1, while Netex have 1,2,3 and 4 legal values.

To be completed by pull request submitter:

  • issue: No.
  • roadmap: No
  • tests: No
  • formatting: Yes
  • documentation: No
  • changelog: Yes

To be completed by @opentripplanner/plc:

  • reviews and approvals by 2 members, ideally from different organizations
  • after merging: update the relevant card on the roadmap

@t2gran t2gran added !Bug Apply to issues describing a bug and PRs witch fixes it. Entur On Entur Roadmap labels Dec 8, 2020
@t2gran t2gran added this to the 2.1 milestone Dec 8, 2020
@t2gran
t2gran requested a review from a team December 8, 2020 14:55
gmellemstrand
gmellemstrand previously approved these changes Dec 8, 2020

@gmellemstrand gmellemstrand left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I have tested this with the Netherlands data and GTFS-RT feed, and it seems to work correctly.

@abyrd abyrd left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks good to me, but I would recommend the method name change @gmellemstrand mentioned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

!Bug Apply to issues describing a bug and PRs witch fixes it. Entur On Entur Roadmap

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants