diff --git a/server/src/main/java/org/elasticsearch/plugins/PluginsUtils.java b/server/src/main/java/org/elasticsearch/plugins/PluginsUtils.java index 8d68ce8b8ce2e..f3acc4b0af8e7 100644 --- a/server/src/main/java/org/elasticsearch/plugins/PluginsUtils.java +++ b/server/src/main/java/org/elasticsearch/plugins/PluginsUtils.java @@ -28,7 +28,6 @@ import java.util.List; import java.util.Locale; import java.util.Map; -import java.util.Objects; import java.util.Set; import java.util.function.Function; import java.util.regex.Matcher; @@ -140,6 +139,7 @@ public static void verifyCompatibility(PluginDescriptor info) { } private record SemanticVersion(int major, int minor, int bugfix, String suffix) { + static final Pattern semanticPattern = Pattern.compile("^(\\d+)\\.(\\d+)\\.(\\d+)(\\D?.*)$"); static SemanticVersion create(String version) { Matcher matcher = semanticPattern.matcher(version);