diff --git a/servers/services/src/main/java/org/projectnessie/services/authz/Check.java b/servers/services/src/main/java/org/projectnessie/services/authz/Check.java index 108ecb5db32..351462c4c20 100644 --- a/servers/services/src/main/java/org/projectnessie/services/authz/Check.java +++ b/servers/services/src/main/java/org/projectnessie/services/authz/Check.java @@ -16,7 +16,6 @@ package org.projectnessie.services.authz; import jakarta.annotation.Nullable; -import jakarta.validation.constraints.NotNull; import java.util.Set; import org.immutables.value.Value; import org.projectnessie.model.Content; @@ -66,32 +65,24 @@ static Check check(CheckType type, RepositoryConfig.Type repositoryConfigType) { return ImmutableCheck.of(type, null, null, null, null, null, repositoryConfigType, Set.of()); } - static Check check(CheckType type, @Nullable NamedRef ref) { + static Check check(CheckType type, NamedRef ref) { return ImmutableCheck.of(type, ref, null, null, null, null, null, Set.of()); } - static Check check(CheckType type, @Nullable NamedRef ref, @Nullable ContentKey key) { + static Check check(CheckType type, NamedRef ref, ContentKey key) { return check(type, ref, key, Set.of()); } - static Check check( - CheckType type, - @Nullable NamedRef ref, - @Nullable ContentKey key, - @NotNull Set actions) { + static Check check(CheckType type, NamedRef ref, ContentKey key, Set actions) { return ImmutableCheck.of(type, ref, key, null, null, null, null, actions); } - static Check check( - CheckType type, @Nullable NamedRef ref, @Nullable IdentifiedContentKey identifiedKey) { + static Check check(CheckType type, NamedRef ref, IdentifiedContentKey identifiedKey) { return check(type, ref, identifiedKey, Set.of()); } static Check check( - CheckType type, - @Nullable NamedRef ref, - @Nullable IdentifiedContentKey identifiedKey, - @NotNull Set actions) { + CheckType type, NamedRef ref, IdentifiedContentKey identifiedKey, Set actions) { if (identifiedKey != null) { IdentifiedContentKey.IdentifiedElement element = identifiedKey.lastElement(); return ImmutableCheck.of(