You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by tw...@apache.org on 2020/05/20 19:47:52 UTC
[flink] 05/08: [hotfix][core] Fix migration version comparision for
1.10
This is an automated email from the ASF dual-hosted git repository.
twalthr pushed a commit to branch release-1.11
in repository https://gitbox.apache.org/repos/asf/flink.git
commit 4dd729bc6946ca32a62f822bad551f393e077a90
Author: Timo Walther <tw...@apache.org>
AuthorDate: Tue May 19 17:18:25 2020 +0200
[hotfix][core] Fix migration version comparision for 1.10
---
.../java/org/apache/flink/testutils/migration/MigrationVersion.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/flink-core/src/test/java/org/apache/flink/testutils/migration/MigrationVersion.java b/flink-core/src/test/java/org/apache/flink/testutils/migration/MigrationVersion.java
index 5a6260a..5f964ec 100644
--- a/flink-core/src/test/java/org/apache/flink/testutils/migration/MigrationVersion.java
+++ b/flink-core/src/test/java/org/apache/flink/testutils/migration/MigrationVersion.java
@@ -25,7 +25,8 @@ package org.apache.flink.testutils.migration;
public enum MigrationVersion {
// NOTE: the version strings must not change,
- // as they are used to locate snapshot file paths
+ // as they are used to locate snapshot file paths.
+ // The definition order matters for performing version arithmetic.
v1_3("1.3"),
v1_4("1.4"),
v1_5("1.5"),
@@ -47,6 +48,6 @@ public enum MigrationVersion {
}
public boolean isNewerVersionThan(MigrationVersion otherVersion) {
- return Double.valueOf(versionStr) > Double.valueOf(otherVersion.versionStr);
+ return this.ordinal() > otherVersion.ordinal();
}
}