flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tzuli...@apache.org
Subject [04/15] flink git commit: [hotfix] [cep] Fix incorrect CompatibilityResult.requiresMigration calls in CEP
Date Tue, 13 Jun 2017 05:17:23 GMT
[hotfix] [cep] Fix incorrect CompatibilityResult.requiresMigration calls in CEP


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

Branch: refs/heads/master
Commit: 8d0c4c0405a24e087e66d3a4bf07d1105eda2fc9
Parents: b216a4a
Author: Tzu-Li (Gordon) Tai <tzulitai@apache.org>
Authored: Sun Jun 11 11:02:38 2017 +0200
Committer: Tzu-Li (Gordon) Tai <tzulitai@apache.org>
Committed: Tue Jun 13 06:37:45 2017 +0200

----------------------------------------------------------------------
 .../apache/flink/api/common/typeutils/CompatibilityResult.java | 6 ++++--
 .../flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java  | 2 +-
 .../src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java   | 2 +-
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/8d0c4c04/flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompatibilityResult.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompatibilityResult.java
b/flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompatibilityResult.java
index 5ad0b5e..4c83ded 100644
--- a/flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompatibilityResult.java
+++ b/flink-core/src/main/java/org/apache/flink/api/common/typeutils/CompatibilityResult.java
@@ -21,6 +21,8 @@ package org.apache.flink.api.common.typeutils;
 import org.apache.flink.annotation.PublicEvolving;
 import org.apache.flink.util.Preconditions;
 
+import javax.annotation.Nonnull;
+
 /**
  * A {@code CompatibilityResult} contains information about whether or not data migration
  * is required in order to continue using new serializers for previously serialized data.
@@ -60,10 +62,10 @@ public final class CompatibilityResult<T> {
 	 *
 	 * @return a result that signals migration is necessary, also providing a convert deserializer.
 	 */
-	public static <T> CompatibilityResult<T> requiresMigration(TypeDeserializer<T>
convertDeserializer) {
+	public static <T> CompatibilityResult<T> requiresMigration(@Nonnull TypeDeserializer<T>
convertDeserializer) {
 		Preconditions.checkNotNull(convertDeserializer, "Convert deserializer cannot be null.");
 
-		return new CompatibilityResult<>(true, Preconditions.checkNotNull(convertDeserializer));
+		return new CompatibilityResult<>(true, convertDeserializer);
 	}
 
 	/**

http://git-wip-us.apache.org/repos/asf/flink/blob/8d0c4c04/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java b/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java
index cac1601..a6c5bde 100644
--- a/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java
+++ b/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/NFA.java
@@ -1108,7 +1108,7 @@ public class NFA<T> implements Serializable {
 				}
 			}
 
-			return CompatibilityResult.requiresMigration(null);
+			return CompatibilityResult.requiresMigration();
 		}
 
 		private void serializeStates(Set<State<T>> states, DataOutputView out) throws
IOException {

http://git-wip-us.apache.org/repos/asf/flink/blob/8d0c4c04/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java
----------------------------------------------------------------------
diff --git a/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java
b/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java
index d592c65..5947465 100644
--- a/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java
+++ b/flink-libraries/flink-cep/src/main/java/org/apache/flink/cep/nfa/SharedBuffer.java
@@ -1163,7 +1163,7 @@ public class SharedBuffer<K extends Serializable, V> implements
Serializable {
 				}
 			}
 
-			return CompatibilityResult.requiresMigration(null);
+			return CompatibilityResult.requiresMigration();
 		}
 	}
 


Mime
View raw message