Commit 065d44f6 authored by Greg Messner's avatar Greg Messner
Browse files

Fixed NPE.

parent cf7a81f1
package org.gitlab4j.api;
import java.util.List;
import javax.ws.rs.core.Form;
import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response;
import org.gitlab4j.api.models.LicenseTemplate;
/**
......@@ -24,8 +26,7 @@ public class LicensesApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
*/
public List<LicenseTemplate> getAllLicenseTemplates() throws GitLabApiException {
GitLabApiForm formData = null;
Response response = get(Response.Status.OK, formData.asMap(), "licenses");
Response response = get(Response.Status.OK, null, "licenses");
return (response.readEntity(new GenericType<List<LicenseTemplate>>() {}));
}
......@@ -53,8 +54,7 @@ public class LicensesApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs
*/
public LicenseTemplate getSingleLicenseTemplate(String key) throws GitLabApiException {
GitLabApiForm formData = null;
Response response = get(Response.Status.OK, formData.asMap(), "licenses", key);
Response response = get(Response.Status.OK, null, "licenses", key);
return (response.readEntity(LicenseTemplate.class));
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment