Commits

pcmanus committed d49bae6

Fix small bug in handling SemanticVersion

  • Participants
  • Parent commits 360d1a2

Comments (0)

Files changed (2)

File src/java/org/apache/cassandra/utils/SemanticVersion.java

 
     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)

File test/unit/org/apache/cassandra/utils/SemanticVersionTest.java

         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");