fix: Fixes issue 1447, NullPointerException when querying number of cars
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!
-
[X] Apply the
AndroidStyle.xmlstyle template to your code in Android Studio. -
[X] Run the unit tests with
gradlew connectedObaGoogleDebugAndroidTestto make sure you didn't break anything -
[X] 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)
Thanks for your feedback, comments addressed.