Reamer commented on a change in pull request #3917:
URL: https://github.com/apache/zeppelin/pull/3917#discussion_r495767500



##########
File path: 
zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
##########
@@ -184,12 +185,18 @@ public static synchronized ZeppelinConfiguration create() 
{
     return conf;
   }
 
+  public Map<String, String> getProperties() {
+    return this.properties;
+  }
+
   public static void reset() {
     conf = null;
   }
 
   public void setProperty(String name, String value) {
-    this.properties.put(name, value);
+    if (name != null && value != null) {

Review comment:
       Maybe `StringUtils.isNoneBlank()`  is better in this place, because with 
this code you can add keys and/or values like `" "`.

##########
File path: 
zeppelin-interpreter/src/main/java/org/apache/zeppelin/conf/ZeppelinConfiguration.java
##########
@@ -76,14 +76,15 @@ private void initProperties() {
     for (ConfigurationNode p : nodes) {
       String name = (String) p.getChildren("name").get(0).getValue();
       String value = (String) p.getChildren("value").get(0).getValue();
-      if (!StringUtils.isEmpty(name)) {
+      if (!StringUtils.isEmpty(name) && !StringUtils.isEmpty(value)) {

Review comment:
       Here I would also prefer `StringUtils.isNoneBlank()`.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to