From 27b8044a398c1397ad0abc7acdf0c7e992e3e771 Mon Sep 17 00:00:00 2001 From: songmw725 Date: Fri, 13 Dec 2024 13:31:29 +0900 Subject: [PATCH] Empty roles --- .../linecorp/centraldogma/server/metadata/ProjectRoles.java | 5 +++++ 1 file changed, 5 insertions(+) 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); }