taycaldwell / riot-api-java

Riot Games API Java Library
http://taycaldwell.github.io/riot-api-java/
Apache License 2.0
190 stars 73 forks source link

RiotApi#getDataChampion NPE #113

Closed drunderscore closed 7 years ago

drunderscore commented 7 years ago

When using getDataChampion(Platform, long), it seems that a problem with the way it passes null parameters to itself.

The meaningful stacktrace is as follows:

java.lang.NullPointerException
    at net.rithms.riot.api.UrlParameter.<init>(UrlParameter.java:46)
    at net.rithms.riot.api.endpoints.static_data.methods.GetDataChampion.<init>(GetDataChampion.java:42)
    at net.rithms.riot.api.RiotApi.getDataChampion(RiotApi.java:552)
    at net.rithms.riot.api.RiotApi.getDataChampion(RiotApi.java:570)

Debugging the API, it seems that the URL is constructed (example), but some null arguments in UrlParameter are causing the issue.

taycaldwell commented 7 years ago

Thank you for the report.

This issue has been fixed - https://github.com/taycaldwell/riot-api-java/commit/109ae9e0f0403ba340618db380cbadd91f66b2dc

Please open another issue if you run into any further issues.

taycaldwell commented 7 years ago

A release with this fix has been made: https://github.com/taycaldwell/riot-api-java/releases/tag/4.0.1