Commit c71699d6 authored by Iain Adams's avatar Iain Adams

handle NPE when calling GitlabGroup.getLdapAccess()

parent 50bd5cc2
......@@ -49,6 +49,9 @@ public class GitlabGroup {
}
public GitlabAccessLevel getLdapAccess() {
if(ldapAccess == null) {
return null;
}
return GitlabAccessLevel.fromAccessValue(ldapAccess);
}
......
......@@ -13,4 +13,10 @@ public class GitlabGroupTest {
group.setLdapAccess(null);
}
@Test
public void getLdapAccessHandlesNull() {
GitlabGroup group = new GitlabGroup();
group.setLdapAccess(null);
group.getLdapAccess();
}
}
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