You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@zeppelin.apache.org by zj...@apache.org on 2018/04/01 03:26:24 UTC

zeppelin git commit: trim property name of interpreter settings

Repository: zeppelin
Updated Branches:
  refs/heads/master 0164cd90e -> b49b3f46f


trim property name of interpreter settings

### What is this PR for?
trim property name of interpreter settings

### What type of PR is it?
Improvement

### Todos
* [x] - Task

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

### How should this be tested?
* First time? Setup Travis CI as described on https://zeppelin.apache.org/contribution/contributions.html#continuous-integration
* Strongly recommended: add automated unit tests for any new or changed behavior
* Outline any manual steps to test the PR here.

### Screenshots (if appropriate)

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

Author: yunl.li <yu...@11bee.com>

Closes #2884 from rockiee281/ZEPPELIN-3335-fix and squashes the following commits:

f407a70 [yunl.li] trim interperter settings


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

Branch: refs/heads/master
Commit: b49b3f46f91d06c4d497f8f11cbc334fd480e539
Parents: 0164cd9
Author: yunl.li <yu...@11bee.com>
Authored: Wed Mar 21 09:41:04 2018 +0800
Committer: Jeff Zhang <zj...@apache.org>
Committed: Sun Apr 1 11:26:17 2018 +0800

----------------------------------------------------------------------
 .../java/org/apache/zeppelin/interpreter/InterpreterSetting.java  | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/b49b3f46/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java
----------------------------------------------------------------------
diff --git a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java
index 816499c..ed8def0 100644
--- a/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java
+++ b/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java
@@ -26,6 +26,7 @@ import com.google.gson.JsonObject;
 import com.google.gson.annotations.SerializedName;
 import com.google.gson.internal.StringMap;
 import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
 import org.apache.zeppelin.conf.ZeppelinConfiguration;
 import org.apache.zeppelin.dep.Dependency;
 import org.apache.zeppelin.dep.DependencyResolver;
@@ -494,7 +495,7 @@ public class InterpreterSetting {
       StringMap<String> map = (StringMap) properties;
       Properties newProperties = new Properties();
       for (String key : map.keySet()) {
-        newProperties.put(key, map.get(key));
+        newProperties.put(StringUtils.trim(key), StringUtils.trim(map.get(key)));
       }
       this.properties = newProperties;
     } else {