diff --git a/server/src/main/java/com/linecorp/centraldogma/server/metadata/ProjectRoles.java b/server/src/main/java/com/linecorp/centraldogma/server/metadata/ProjectRoles.java index 6b7d45843..1d5eff185 100644 --- a/server/src/main/java/com/linecorp/centraldogma/server/metadata/ProjectRoles.java +++ b/server/src/main/java/com/linecorp/centraldogma/server/metadata/ProjectRoles.java @@ -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); }