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

Unhandled NullPointerException if a team number or event code does not exist #5

Open
NicholasBottone opened this issue Apr 5, 2021 · 0 comments

Comments

@NicholasBottone
Copy link

When passing in a team number to TeamRequest.getTeam(), the method .getJson() is called on the API response, which will cause a NullPointerException if the team number does not exist. The same result will happen if an invalid event code is provided, or any other similar invalid parameter. Since the method does not handle the exception, there is no way for the implementer to handle the exception. Perhaps the methods should throw NullPointerException, that way the implementer can catch the Exception in the event the team number does not exist.

https://github.com/RaiderRobotix/blue-alliance-api-java-library/blob/master/src/main/java/com/thebluealliance/api/v3/requests/TeamRequest.java#L34

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

No branches or pull requests

1 participant