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

Fixed NPE.

No related merge requests found
Showing with 4 additions and 4 deletions
+4 -4
package org.gitlab4j.api; package org.gitlab4j.api;
import java.util.List; import java.util.List;
import javax.ws.rs.core.Form; import javax.ws.rs.core.Form;
import javax.ws.rs.core.GenericType; import javax.ws.rs.core.GenericType;
import javax.ws.rs.core.Response; import javax.ws.rs.core.Response;
import org.gitlab4j.api.models.LicenseTemplate; import org.gitlab4j.api.models.LicenseTemplate;
/** /**
...@@ -24,8 +26,7 @@ public class LicensesApi extends AbstractApi { ...@@ -24,8 +26,7 @@ public class LicensesApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public List<LicenseTemplate> getAllLicenseTemplates() throws GitLabApiException { public List<LicenseTemplate> getAllLicenseTemplates() throws GitLabApiException {
GitLabApiForm formData = null; Response response = get(Response.Status.OK, null, "licenses");
Response response = get(Response.Status.OK, formData.asMap(), "licenses");
return (response.readEntity(new GenericType<List<LicenseTemplate>>() {})); return (response.readEntity(new GenericType<List<LicenseTemplate>>() {}));
} }
...@@ -53,8 +54,7 @@ public class LicensesApi extends AbstractApi { ...@@ -53,8 +54,7 @@ public class LicensesApi extends AbstractApi {
* @throws GitLabApiException if any exception occurs * @throws GitLabApiException if any exception occurs
*/ */
public LicenseTemplate getSingleLicenseTemplate(String key) throws GitLabApiException { public LicenseTemplate getSingleLicenseTemplate(String key) throws GitLabApiException {
GitLabApiForm formData = null; Response response = get(Response.Status.OK, null, "licenses", key);
Response response = get(Response.Status.OK, formData.asMap(), "licenses", key);
return (response.readEntity(LicenseTemplate.class)); 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