[bugfix](mergeprofile) ignore null profile to avoid bug (#27860)

---------

Co-authored-by: yiguolei <yiguolei@gmail.com>
This commit is contained in:
yiguolei
2023-12-01 16:56:29 +08:00
committed by GitHub
parent 34c85c962f
commit 18338a33b6
2 changed files with 7 additions and 4 deletions

View File

@ -448,7 +448,12 @@ public class RuntimeProfile {
private static List<RuntimeProfile> getChildListFromLists(String profileName, List<RuntimeProfile> profiles) {
List<RuntimeProfile> ret = new ArrayList<RuntimeProfile>();
for (RuntimeProfile profile : profiles) {
ret.add(profile.getChildMap().get(profileName));
RuntimeProfile tmp = profile.getChildMap().get(profileName);
if (tmp != null) {
ret.add(profile.getChildMap().get(profileName));
} else {
LOG.debug("could not find {} from {}", profileName, profile.toString());
}
}
return ret;
}