nabeelmukhtar / github-java-sdk

This project aims to provide a Java wrapper for Github API.
http://develop.github.com/
64 stars 22 forks source link

Optional arguments to createRepository() yield NullPointerException #12

Closed thallgren closed 13 years ago

thallgren commented 13 years ago

The description and homePage parameters to the RepositoryService.createRepository() method should be optional. Passing them as null results the following:

java.lang.NullPointerException
    at java.net.URLEncoder.encode(URLEncoder.java:205)
    at com.github.api.v2.services.impl.GitHubApiGateway.encodeUrl(GitHubApiGateway.java:539)
    at com.github.api.v2.services.impl.GitHubApiGateway.getParametersString(GitHubApiGateway.java:403)
    at com.github.api.v2.services.impl.GitHubApiGateway.callApiPost(GitHubApiGateway.java:312)
    at com.github.api.v2.services.impl.GitHubApiGateway.callApiPost(GitHubApiGateway.java:273)
    at com.github.api.v2.services.impl.RepositoryServiceImpl.createRepository(RepositoryServiceImpl.java:92)
nabeelmukhtar commented 13 years ago

This issue has been fixed in the master branch.