Skip to content

Commit

Permalink
Empty roles
Browse files Browse the repository at this point in the history
  • Loading branch information
minwoox committed Dec 13, 2024
1 parent fe31752 commit 27b8044
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@
*/
public final class ProjectRoles {

private static final ProjectRoles EMPTY = new ProjectRoles(null, null);

/**
* Returns a new {@link ProjectRoles} with the specified {@link RepositoryRole}s.
*/
public static ProjectRoles of(@Nullable RepositoryRole member, @Nullable RepositoryRole guest) {
if (member == null && guest == null) {
return EMPTY;
}
return new ProjectRoles(member, guest);
}

Expand Down

0 comments on commit 27b8044

Please sign in to comment.