cassandra-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From brandonwilli...@apache.org
Subject [1/9] git commit: Fix small bug in handling SemanticVersion
Date Fri, 25 Jan 2013 20:27:58 GMT
Fix small bug in handling SemanticVersion


Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/d49bae6c
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/d49bae6c
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/d49bae6c

Branch: refs/heads/trunk
Commit: d49bae6c9bb108a9350866a3759f92807c88e43a
Parents: 360d1a2
Author: Sylvain Lebresne <sylvain@datastax.com>
Authored: Thu Jan 24 18:39:49 2013 +0100
Committer: Sylvain Lebresne <sylvain@datastax.com>
Committed: Thu Jan 24 18:39:49 2013 +0100

----------------------------------------------------------------------
 .../apache/cassandra/utils/SemanticVersion.java    |    2 +-
 .../cassandra/utils/SemanticVersionTest.java       |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cassandra/blob/d49bae6c/src/java/org/apache/cassandra/utils/SemanticVersion.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/utils/SemanticVersion.java b/src/java/org/apache/cassandra/utils/SemanticVersion.java
index 00305cb..fd122ad 100644
--- a/src/java/org/apache/cassandra/utils/SemanticVersion.java
+++ b/src/java/org/apache/cassandra/utils/SemanticVersion.java
@@ -143,7 +143,7 @@ public class SemanticVersion implements Comparable<SemanticVersion>
 
     public boolean isSupportedBy(SemanticVersion version)
     {
-        return major == version.major && minor <= version.minor;
+        return major == version.major && minor <= version.minor && patch
<= version.patch;
     }
 
     private static int compareIdentifiers(String[] ids1, String[] ids2, int defaultPred)

http://git-wip-us.apache.org/repos/asf/cassandra/blob/d49bae6c/test/unit/org/apache/cassandra/utils/SemanticVersionTest.java
----------------------------------------------------------------------
diff --git a/test/unit/org/apache/cassandra/utils/SemanticVersionTest.java b/test/unit/org/apache/cassandra/utils/SemanticVersionTest.java
index 6d03d3f..010964f 100644
--- a/test/unit/org/apache/cassandra/utils/SemanticVersionTest.java
+++ b/test/unit/org/apache/cassandra/utils/SemanticVersionTest.java
@@ -71,7 +71,7 @@ public class SemanticVersionTest
         v1 = new SemanticVersion("1.2.3");
         v2 = new SemanticVersion("1.2.4");
         assert v1.isSupportedBy(v2);
-        assert v2.isSupportedBy(v1);
+        assert !v2.isSupportedBy(v1);
 
         v1 = new SemanticVersion("1.2.3");
         v2 = new SemanticVersion("1.3.3");


Mime
View raw message