未验证 提交 7b21c337 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Fix NPE when ALS is off. (#2715)

上级 9c2f5c9c
......@@ -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());
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册