Skip to content

Commit 065d44f

Browse files
committed
Fixed NPE.
1 parent cf7a81f commit 065d44f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/org/gitlab4j/api/LicensesApi.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
package org.gitlab4j.api;
22

33
import java.util.List;
4+
45
import javax.ws.rs.core.Form;
56
import javax.ws.rs.core.GenericType;
67
import javax.ws.rs.core.Response;
8+
79
import org.gitlab4j.api.models.LicenseTemplate;
810

911
/**
@@ -24,8 +26,7 @@ public LicensesApi(GitLabApi gitLabApi) {
2426
* @throws GitLabApiException if any exception occurs
2527
*/
2628
public List<LicenseTemplate> getAllLicenseTemplates() throws GitLabApiException {
27-
GitLabApiForm formData = null;
28-
Response response = get(Response.Status.OK, formData.asMap(), "licenses");
29+
Response response = get(Response.Status.OK, null, "licenses");
2930
return (response.readEntity(new GenericType<List<LicenseTemplate>>() {}));
3031
}
3132

@@ -53,8 +54,7 @@ public List<LicenseTemplate> getPopularLicenseTemplates() throws GitLabApiExcept
5354
* @throws GitLabApiException if any exception occurs
5455
*/
5556
public LicenseTemplate getSingleLicenseTemplate(String key) throws GitLabApiException {
56-
GitLabApiForm formData = null;
57-
Response response = get(Response.Status.OK, formData.asMap(), "licenses", key);
57+
Response response = get(Response.Status.OK, null, "licenses", key);
5858
return (response.readEntity(LicenseTemplate.class));
5959
}
6060
}

0 commit comments

Comments
 (0)