diff --git a/core/src/main/java/de/bwaldvogel/mongo/MongoVersion.java b/core/src/main/java/de/bwaldvogel/mongo/MongoVersion.java index 6ad3184c..a1cdb6e3 100644 --- a/core/src/main/java/de/bwaldvogel/mongo/MongoVersion.java +++ b/core/src/main/java/de/bwaldvogel/mongo/MongoVersion.java @@ -2,11 +2,15 @@ import java.util.List; +import de.bwaldvogel.mongo.backend.Utils; + public interface MongoVersion { List getVersionArray(); - String toVersionString(); + default String toVersionString() { + return Utils.join(getVersionArray(), "."); + } int getWireVersion(); diff --git a/core/src/main/java/de/bwaldvogel/mongo/ServerVersion.java b/core/src/main/java/de/bwaldvogel/mongo/ServerVersion.java index ae27d9f6..3c295d73 100644 --- a/core/src/main/java/de/bwaldvogel/mongo/ServerVersion.java +++ b/core/src/main/java/de/bwaldvogel/mongo/ServerVersion.java @@ -3,8 +3,6 @@ import java.util.Collections; import java.util.List; -import de.bwaldvogel.mongo.backend.Utils; - public enum ServerVersion implements MongoVersion { MONGO_3_6(List.of(3, 6, 0), 6); @@ -20,10 +18,6 @@ public List getVersionArray() { return Collections.unmodifiableList(versionArray); } - public String toVersionString() { - return Utils.join(versionArray, "."); - } - public int getWireVersion() { return wireVersion; }