fix: 修复空指针异常
This commit is contained in:
parent
497c2c3393
commit
9b16d71bae
|
@ -115,7 +115,9 @@ public class ApiAutomationService {
|
||||||
if (map != null) {
|
if (map != null) {
|
||||||
if (map.isEmpty()) {
|
if (map.isEmpty()) {
|
||||||
List<String> ids = (List<String>) JSONPath.read(definition, "$..projectId");
|
List<String> ids = (List<String>) JSONPath.read(definition, "$..projectId");
|
||||||
|
if (CollectionUtils.isNotEmpty(ids)) {
|
||||||
idList.addAll(new HashSet<>(ids));
|
idList.addAll(new HashSet<>(ids));
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
Set<String> set = d.getEnvironmentMap().keySet();
|
Set<String> set = d.getEnvironmentMap().keySet();
|
||||||
idList = new ArrayList<>(set);
|
idList = new ArrayList<>(set);
|
||||||
|
|
Loading…
Reference in New Issue