Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSam Davis2014-09-03 00:08:07 +0000
committerSam Davis2014-09-03 14:55:35 +0000
commitdb0bb84a5b30d2fe2ae7cf6cdc38aaabbbf2315e (patch)
treed4d2066f056498555e16b77d94ece8e3caffe0ba
parenta66d319e326fbc81302c4dd7fa47abb6295ccda8 (diff)
downloadorg.eclipse.mylyn.reviews-e_4_4_m_3_13_x.tar.gz
org.eclipse.mylyn.reviews-e_4_4_m_3_13_x.tar.xz
org.eclipse.mylyn.reviews-e_4_4_m_3_13_x.zip
441699: cannot connect to Gerrit 2.8.6.1R_3_13_0e_4_4_m_3_13_x
Change-Id: Iedf5f3241bde197c8db78703005d4c22f74d68ba Task-Url: https://bugs.eclipse.org/bugs/show_bug.cgi?id=441699
-rw-r--r--org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/client/GerritVersion.java4
-rw-r--r--org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/gerrit/tests/core/client/GerritVersionTest.java14
2 files changed, 15 insertions, 3 deletions
diff --git a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/client/GerritVersion.java b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/client/GerritVersion.java
index b90d2480..217e72b7 100644
--- a/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/client/GerritVersion.java
+++ b/org.eclipse.mylyn.gerrit.core/src/org/eclipse/mylyn/internal/gerrit/core/client/GerritVersion.java
@@ -39,8 +39,8 @@ public class GerritVersion extends Version {
// e.g. 2.6-rc3
private static final Pattern MAJOR_MINOR_QUALIFIER_VERSION_PATTERN = Pattern.compile("V?(\\d+)\\.(\\d+)-([-\\w]+).*"); //$NON-NLS-1$
- // e.g. 2.6.1-rc1
- private static final Pattern MAJOR_MINOR_MICRO_QUALIFIER_VERSION_PATTERN = Pattern.compile("V?(\\d+)\\.(\\d+)\\.(\\d+)-([-\\w]+).*"); //$NON-NLS-1$
+ // e.g. 2.6.1-rc1, 2.8.6.1
+ private static final Pattern MAJOR_MINOR_MICRO_QUALIFIER_VERSION_PATTERN = Pattern.compile("V?(\\d+)\\.(\\d+)\\.(\\d+)[-\\.]([-\\w]+).*"); //$NON-NLS-1$
public GerritVersion(String version) {
super(version);
diff --git a/org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/gerrit/tests/core/client/GerritVersionTest.java b/org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/gerrit/tests/core/client/GerritVersionTest.java
index 9da63a49..5eee0e0e 100644
--- a/org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/gerrit/tests/core/client/GerritVersionTest.java
+++ b/org.eclipse.mylyn.gerrit.tests/src/org/eclipse/mylyn/gerrit/tests/core/client/GerritVersionTest.java
@@ -11,7 +11,10 @@
package org.eclipse.mylyn.gerrit.tests.core.client;
-import static org.eclipse.mylyn.internal.gerrit.core.client.GerritVersion.*;
+import static org.eclipse.mylyn.internal.gerrit.core.client.GerritVersion.isVersion24x;
+import static org.eclipse.mylyn.internal.gerrit.core.client.GerritVersion.isVersion26OrLater;
+import static org.eclipse.mylyn.internal.gerrit.core.client.GerritVersion.isVersion29OrLater;
+import static org.eclipse.mylyn.internal.gerrit.core.client.GerritVersion.parseGerritVersion;
import junit.framework.TestCase;
import org.junit.Test;
@@ -113,6 +116,15 @@ public class GerritVersionTest extends TestCase {
}
@Test
+ public void testParse_2861() throws Exception {
+ Version v = parseGerritVersion("2.8.6.1");
+ assertEquals(2, v.getMajor());
+ assertEquals(8, v.getMinor());
+ assertEquals(6, v.getMicro());
+ assertEquals("1", v.getQualifier());
+ }
+
+ @Test
public void testIsVersion26OrLater() throws Exception {
assertFalse(isVersion26OrLater(parseGerritVersion("2.5.9")));
assertFalse(isVersion26OrLater(parseGerritVersion("2.5.9-q")));

Back to the top