flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From se...@apache.org
Subject [3/3] flink git commit: [hotfix] [core] Prevent potential null pointer in MemorySize.equals(...)
Date Wed, 04 Oct 2017 19:12:23 GMT
[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 <sewen@apache.org>
Authored: Mon Oct 2 14:15:14 2017 +0200
Committer: Stephan Ewen <sewen@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


Mime
View raw message