You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by mo...@apache.org on 2016/09/10 17:43:16 UTC

zeppelin git commit: [ZEPPELIN-1422][zeppelin-interpreter] fix InterpreterProperty equals methods, add null check

Repository: zeppelin
Updated Branches:
  refs/heads/master 3a1568efc -> 2a7fb95c2


[ZEPPELIN-1422][zeppelin-interpreter] fix InterpreterProperty equals methods, add null check

### What is this PR for?
in PR https://github.com/apache/zeppelin/pull/1382,
there is a small bug that `InterpreterProperty.equals` do not check `null`.
jdk lib request the `null` check otherwise it has the risk causing java collections operation throw exception.
so I fix it.

### What type of PR is it?
Bug Fix

### Todos
N/A

### What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-1422

### How should this be tested?
existing test.

### Screenshots (if appropriate)

### Questions:
* Does the licenses files need update? no
* Is there breaking changes for older versions? no
* Does this needs documentation? no

Author: WeichenXu <We...@outlook.com>

Closes #1421 from WeichenXu123/fix_InterpreterProperty.equals and squashes the following commits:

eb8d4ee [WeichenXu] fix_InterpreterProperty.equals


Project: http://git-wip-us.apache.org/repos/asf/zeppelin/repo
Commit: http://git-wip-us.apache.org/repos/asf/zeppelin/commit/2a7fb95c
Tree: http://git-wip-us.apache.org/repos/asf/zeppelin/tree/2a7fb95c
Diff: http://git-wip-us.apache.org/repos/asf/zeppelin/diff/2a7fb95c

Branch: refs/heads/master
Commit: 2a7fb95c2f1f319b0ee847e18dbff1b4bc1c23b5
Parents: 3a1568e
Author: WeichenXu <We...@outlook.com>
Authored: Wed Sep 7 21:46:27 2016 -0700
Committer: Lee moon soo <mo...@apache.org>
Committed: Sat Sep 10 10:43:11 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/zeppelin/interpreter/InterpreterProperty.java   | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/2a7fb95c/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java
----------------------------------------------------------------------
diff --git a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java
index c69de5d..92a23d6 100644
--- a/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java
+++ b/zeppelin-interpreter/src/main/java/org/apache/zeppelin/interpreter/InterpreterProperty.java
@@ -75,6 +75,7 @@ public class InterpreterProperty {
   }
 
   public boolean equals(Object o) {
+    if (o == null) return false;
     return this.toString().equals(o.toString());
   }