You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by ma...@apache.org on 2020/01/22 13:29:28 UTC

[cassandra] branch cassandra-2.2 updated: Fix in-jvm upgrade dtest version parsing

This is an automated email from the ASF dual-hosted git repository.

marcuse pushed a commit to branch cassandra-2.2
in repository https://gitbox.apache.org/repos/asf/cassandra.git


The following commit(s) were added to refs/heads/cassandra-2.2 by this push:
     new 91f321e  Fix in-jvm upgrade dtest version parsing
91f321e is described below

commit 91f321e096714128b36732313e54975e466315f9
Author: Marcus Eriksson <ma...@apache.org>
AuthorDate: Thu Jan 16 11:22:48 2020 +0100

    Fix in-jvm upgrade dtest version parsing
    
    Patch by marcuse; reviewed by David Capwell for CASSANDRA-15509
---
 test/distributed/org/apache/cassandra/distributed/impl/Versions.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/distributed/org/apache/cassandra/distributed/impl/Versions.java b/test/distributed/org/apache/cassandra/distributed/impl/Versions.java
index dba1c13..8e8e284 100644
--- a/test/distributed/org/apache/cassandra/distributed/impl/Versions.java
+++ b/test/distributed/org/apache/cassandra/distributed/impl/Versions.java
@@ -146,7 +146,7 @@ public class Versions
     public static Versions find()
     {
         logger.info("Looking for dtest jars in " + new File("build").getAbsolutePath());
-        final Pattern pattern = Pattern.compile("dtest-([0-9.]+)\\.jar");
+        final Pattern pattern = Pattern.compile("dtest-(?<fullversion>(\\d+)\\.(\\d+)(\\.\\d+)?(\\.\\d+)?)([~\\-]\\w[.\\w]*(?:\\-\\w[.\\w]*)*)?(\\+[.\\w]+)?\\.jar");
         final Map<Major, List<Version>> versions = new HashMap<>();
         for (Major major : Major.values())
             versions.put(major, new ArrayList<>());
@@ -156,7 +156,7 @@ public class Versions
             Matcher m = pattern.matcher(file.getName());
             if (!m.matches())
                 continue;
-            String version = m.group(1);
+            String version = m.group("fullversion");
             Major major = Major.fromFull(version);
             versions.get(major).add(new Version(major, version, new URL[] { toURL(file) }));
         }


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org