Skip to content

Conversation

@fvilarino
Copy link

What

This PR fixes Issue 1447

How

The null pointer exception was caused by accessing the name property on the currentRegion variable. The fix consists in inverting the logic and perfoming the equals check on the constant, so that the check returns false if the currentRegion is null.

This PR also adds tests for the ObaArrivalInfo class.

Please make sure these boxes are checked before submitting your pull request - thanks!

  • Apply the AndroidStyle.xml style template to your code in Android Studio.

  • Run the unit tests with gradlew connectedObaGoogleDebugAndroidTest to make sure you didn't break anything

  • If you have multiple commits please combine them into one commit by squashing them for the initial submission of the pull request. When addressing comments on a pull request, please push a new commit per comment when possible (reviewers will squash and merge using GitHub merge tool)

@CLAassistant
Copy link

CLAassistant commented Dec 14, 2025

CLA assistant check
All committers have signed the CLA.

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.

Crash: NullPointerException in ObaArrivalInfo.getNumCars

2 participants