absurdfarce commented on code in PR #1958:
URL: 
https://github.com/apache/cassandra-java-driver/pull/1958#discussion_r1823018023


##########
test-infra/src/main/java/com/datastax/oss/driver/api/testinfra/ccm/CcmBridge.java:
##########
@@ -175,25 +176,24 @@ private static boolean isWindows() {
     return System.getProperty("os.name", 
"").toLowerCase(Locale.US).contains("win");
   }
 
-  public Optional<Version> getDseVersion() {
-    return DSE_ENABLEMENT ? Optional.of(VERSION) : Optional.empty();
+  public static boolean isDistributionOf(BackendType type) {
+    return DISTRIBUTION == type;
+  }
+
+  public static boolean isDistributionOf(BackendType type, VersionComparator 
comparator) {
+    return isDistributionOf(type)
+        && comparator.accept(getDistributionVersion(), getCassandraVersion());
+  }

Review Comment:
   I like this more since it at least preserves the one-shot comparison of 
backend type + version but overall I would still argue for something built 
around the Optional type.  But this PR has been held up long enough as-is and I 
don't feel strongly enough about it to hold things up any longer so we'll roll 
with this.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to