From 6ceee0be8f7901066e9aafcbb0850ebb7e8bce63 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Tue, 12 Dec 2017 22:15:59 -0500 Subject: [PATCH] Fix version parsing in SQL I have no idea why this logic was only looking at snapshot JARs (what is suppose to happen in production?). This breaks the release tests though which we really need to have stable. This commit fixes this by also considering non-snapshot JARs. Original commit: elastic/x-pack-elasticsearch@47020ed3aab3704e43b5cec96c6989b963398968 --- .../java/org/elasticsearch/xpack/sql/client/shared/Version.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Version.java b/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Version.java index f991aa3d792..b63a4765a7f 100644 --- a/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Version.java +++ b/sql/shared-client/src/main/java/org/elasticsearch/xpack/sql/client/shared/Version.java @@ -76,7 +76,7 @@ public abstract class Version { String ver = "Unknown"; String hash = ver; - if (urlStr.startsWith("file:/") && urlStr.endsWith("-SNAPSHOT.jar")) { + if (urlStr.startsWith("file:/") && urlStr.endsWith(".jar")) { try (JarInputStream jar = new JarInputStream(url.openStream())) { Manifest manifest = jar.getManifest(); hash = manifest.getMainAttributes().getValue("Change");