Commit 778c6ff6 authored by Tim Olshansky's avatar Tim Olshansky

Merge pull request #125 from hamdrew/117-ldap_access-null

Added a null check to GitlabGroup#setLdapAccess. 
parents e33831a4 8f40c65c
......@@ -53,6 +53,8 @@ public class GitlabGroup {
}
public void setLdapAccess(GitlabAccessLevel ldapGitlabAccessLevel) {
this.ldapAccess = ldapGitlabAccessLevel.accessValue;
if (ldapGitlabAccessLevel != null) {
this.ldapAccess = ldapGitlabAccessLevel.accessValue;
}
}
}
package org.gitlab.api.models;
import org.junit.Test;
/**
* Tests for {@link GitlabGroup}
*/
public class GitlabGroupTest {
@Test
public void setLdapAccessHandlesNull() {
GitlabGroup group = new GitlabGroup();
group.setLdapAccess(null);
}
}
Markdown is supported
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