diff --git a/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/ServiceUtils.java b/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/ServiceUtils.java index 4b5ec48f99b74..6d4b6d35323fd 100644 --- a/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/ServiceUtils.java +++ b/x-pack/plugin/inference/src/main/java/org/elasticsearch/xpack/inference/services/ServiceUtils.java @@ -39,7 +39,7 @@ import static org.elasticsearch.core.Strings.format; import static org.elasticsearch.xpack.inference.services.ServiceFields.SIMILARITY; -public class ServiceUtils { +public final class ServiceUtils { /** * Remove the object from the map and cast to the expected type. * If the object cannot be cast to type an ElasticsearchStatusException @@ -624,4 +624,6 @@ public static SecureString apiKey(@Nullable ApiKeySecrets secrets) { // To avoid a possible null pointer throughout the code we'll create a noop api key of an empty array return secrets == null ? new SecureString(new char[0]) : secrets.apiKey(); } + + private ServiceUtils() {} }