Repository: zeppelin
Updated Branches:
  refs/heads/branch-0.7 2b82aec52 -> a386253b7


[ZEPPELIN-2152] Fix for npe in Helium loading when no proxies are set

Emergency fix for npe when calling Helium and with no proxies env variables set.

Bug Fix

https://issues.apache.org/jira/browse/ZEPPELIN-2152

* clone new zeppelin repository
* unset http_proxy/https_proxy env variables (if set)
* build ` mvn clean package -DskipTests;`
* start zeppelin instance

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

Author: Nelson Costa <[email protected]>

Closes #2380 from necosta/zeppelin2152-patch and squashes the following commits:

cb25cd7 [Nelson Costa] [ZEPPELIN-2152] Fix for npe in Helium loading when no 
proxies are set

(cherry picked from commit 88c5c3ccd9e346d48637d3c63c8dff5ba53c8d8e)
Signed-off-by: Lee moon soo <[email protected]>


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

Branch: refs/heads/branch-0.7
Commit: a386253b7fec7547fd4ee68c2c48be201ffe025d
Parents: 2b82aec
Author: Nelson Costa <[email protected]>
Authored: Wed May 31 12:20:27 2017 +0100
Committer: Lee moon soo <[email protected]>
Committed: Wed May 31 11:21:15 2017 -0700

----------------------------------------------------------------------
 .../org/apache/zeppelin/helium/HeliumVisualizationFactory.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zeppelin/blob/a386253b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumVisualizationFactory.java
----------------------------------------------------------------------
diff --git 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumVisualizationFactory.java
 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumVisualizationFactory.java
index d185c79..acbc515 100644
--- 
a/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumVisualizationFactory.java
+++ 
b/zeppelin-zengine/src/main/java/org/apache/zeppelin/helium/HeliumVisualizationFactory.java
@@ -122,9 +122,10 @@ public class HeliumVisualizationFactory {
         System.getenv("HTTPS_PROXY") : System.getenv("https_proxy");
 
     try {
-      if (isSecure)
+      if (isSecure && StringUtils.isNotBlank(httpsProxy))
         proxies.add(generateProxy("secure", new URI(httpsProxy)));
-      else proxies.add(generateProxy("insecure", new URI(httpProxy)));
+      else if (!isSecure && StringUtils.isNotBlank(httpsProxy))
+        proxies.add(generateProxy("insecure", new URI(httpProxy)));
     } catch (Exception ex) {
       logger.error(ex.getMessage(), ex);
     }

Reply via email to