This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch npe in repository https://gitbox.apache.org/repos/asf/skywalking.git
commit aac7daffa21fa4e51bef0db33eafeef00fba553d Author: Wu Sheng <wu.sh...@foxmail.com> AuthorDate: Sun May 19 23:04:20 2019 +0800 Fix NPE when ALS is off. --- .../oap/server/receiver/envoy/EnvoyMetricReceiverConfig.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/EnvoyMetricReceiverConfig.java b/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/EnvoyMetricReceiverConfig.java index b7ff4d8..108f965 100644 --- a/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/EnvoyMetricReceiverConfig.java +++ b/oap-server/server-receiver-plugin/envoy-metrics-receiver-plugin/src/main/java/org/apache/skywalking/oap/server/receiver/envoy/EnvoyMetricReceiverConfig.java @@ -18,18 +18,21 @@ package org.apache.skywalking.oap.server.receiver.envoy; +import com.google.common.base.Strings; import java.util.*; import java.util.stream.Collectors; - import org.apache.skywalking.oap.server.library.module.ModuleConfig; /** - * @author wusheng,gaohongtao + * @author wusheng, gaohongtao */ public class EnvoyMetricReceiverConfig extends ModuleConfig { private String alsHTTPAnalysis; public List<String> getAlsHTTPAnalysis() { + if (Strings.isNullOrEmpty(alsHTTPAnalysis)) { + return Collections.EMPTY_LIST; + } return Arrays.stream(alsHTTPAnalysis.trim().split(",")).map(String::trim).collect(Collectors.toList()); } }