mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-03-01 16:39:11 +00:00
Revert "Revert "Fix version parsing in SQL""
This reverts commit elastic/x-pack-elasticsearch@a3ef6b43f9. We'll merge this when we're good and ready. Original commit: elastic/x-pack-elasticsearch@06d1e3311d
This commit is contained in:
parent
cdfe0f1f5a
commit
e170021037
@ -76,7 +76,7 @@ public abstract class Version {
|
|||||||
String ver = "Unknown";
|
String ver = "Unknown";
|
||||||
String hash = ver;
|
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())) {
|
try (JarInputStream jar = new JarInputStream(url.openStream())) {
|
||||||
Manifest manifest = jar.getManifest();
|
Manifest manifest = jar.getManifest();
|
||||||
hash = manifest.getMainAttributes().getValue("Change");
|
hash = manifest.getMainAttributes().getValue("Change");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user