From 50ddacc6c31afeb0586df9c20fd215e85d9a7108 Mon Sep 17 00:00:00 2001 From: Nikolaj Volgushev Date: Mon, 12 Feb 2024 11:38:46 +0100 Subject: [PATCH] Nullable --- .../core/security/authz/privilege/ClusterPrivilegeResolver.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/ClusterPrivilegeResolver.java b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/ClusterPrivilegeResolver.java index 78759db91e92e..d12bc31b15697 100644 --- a/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/ClusterPrivilegeResolver.java +++ b/x-pack/plugin/core/src/main/java/org/elasticsearch/xpack/core/security/authz/privilege/ClusterPrivilegeResolver.java @@ -23,6 +23,7 @@ import org.elasticsearch.action.ingest.SimulatePipelineAction; import org.elasticsearch.common.Strings; import org.elasticsearch.common.util.Maps; +import org.elasticsearch.core.Nullable; import org.elasticsearch.transport.RemoteClusterService; import org.elasticsearch.transport.TransportRequest; import org.elasticsearch.xpack.core.action.XPackInfoAction; @@ -430,6 +431,7 @@ public static NamedClusterPrivilege resolve(String name) { } + @Nullable public static NamedClusterPrivilege getNamedOrNull(String name) { return VALUES.get(Objects.requireNonNull(name).toLowerCase(Locale.ROOT)); }