未验证 提交 cd2fb513 编写于 作者: 静夜思朝颜's avatar 静夜思朝颜 提交者: GitHub

Fix GraphQL profile queried error when cannot matches any snapshot (#4490)

* Fix GraphQL profile queried error when cannot matches any snapshot

* fix adding list bug
Co-authored-by: NMrproliu <mrproliu@lagou.com>
Co-authored-by: wu-sheng's avatar吴晟 Wu Sheng <wu.sheng@foxmail.com>
上级 39489ebc
......@@ -88,7 +88,10 @@ public class ProfileAnalyzer {
}).flatMap(Collection::stream).map(ProfileStack::deserialize).distinct().collect(Collectors.toList());
// analyze
analyzation.setTrees(analyze(stacks));
final List<ProfileStackTree> trees = analyze(stacks);
if (trees != null) {
analyzation.getTrees().addAll(trees);
}
return analyzation;
}
......
......@@ -18,6 +18,7 @@
package org.apache.skywalking.oap.server.core.query.entity;
import java.util.ArrayList;
import java.util.List;
import lombok.Getter;
import lombok.Setter;
......@@ -33,4 +34,7 @@ public class ProfileAnalyzation {
// thread stack dump analyze trees
private List<ProfileStackTree> trees;
public ProfileAnalyzation() {
this.trees = new ArrayList<>();
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册