You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flink.apache.org by se...@apache.org on 2017/10/04 19:12:23 UTC

[3/3] flink git commit: [hotfix] [core] Prevent potential null pointer in MemorySize.equals(...)

[hotfix] [core] Prevent potential null pointer in MemorySize.equals(...)


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

Branch: refs/heads/master
Commit: 5f1ec4af5d8065b503f682afcafdb6d7febb686c
Parents: 472ae47
Author: Stephan Ewen <se...@apache.org>
Authored: Mon Oct 2 14:15:14 2017 +0200
Committer: Stephan Ewen <se...@apache.org>
Committed: Wed Oct 4 20:49:37 2017 +0200

----------------------------------------------------------------------
 .../src/main/java/org/apache/flink/configuration/MemorySize.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/5f1ec4af/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java
----------------------------------------------------------------------
diff --git a/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java b/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java
index 800a216..ff38837 100644
--- a/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java
+++ b/flink-core/src/main/java/org/apache/flink/configuration/MemorySize.java
@@ -122,7 +122,8 @@ public class MemorySize implements java.io.Serializable {
 
 	@Override
 	public boolean equals(Object obj) {
-		return obj == this || obj.getClass() == this.getClass() && ((MemorySize) obj).bytes == this.bytes;
+		return obj == this || 
+				(obj != null && obj.getClass() == this.getClass() && ((MemorySize) obj).bytes == this.bytes);
 	}
 
 	@Override