fix(场景自动化): 查看场景时报空指针异常
This commit is contained in:
parent
0073ed1307
commit
79e11e651a
|
@ -114,9 +114,13 @@ public class ApiAutomationService {
|
||||||
Map<String, String> map = d.getEnvironmentMap();
|
Map<String, String> map = d.getEnvironmentMap();
|
||||||
if (map != null) {
|
if (map != null) {
|
||||||
if (map.isEmpty()) {
|
if (map.isEmpty()) {
|
||||||
List<String> ids = (List<String>) JSONPath.read(definition, "$..projectId");
|
try {
|
||||||
if (CollectionUtils.isNotEmpty(ids)) {
|
List<String> ids = (List<String>) JSONPath.read(definition, "$..projectId");
|
||||||
idList.addAll(new HashSet<>(ids));
|
if (CollectionUtils.isNotEmpty(ids)) {
|
||||||
|
idList.addAll(new HashSet<>(ids));
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
LogUtil.error("JSONPath.read projectId fail.");
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Set<String> set = d.getEnvironmentMap().keySet();
|
Set<String> set = d.getEnvironmentMap().keySet();
|
||||||
|
|
Loading…
Reference in New Issue