mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-14 13:47:09 +00:00
(fix)(headless) fix dfs NullPointerException when model is null. (#2212)
This commit is contained in:
@@ -48,6 +48,9 @@ public class ModelClusterBuilder {
|
|||||||
|
|
||||||
private static void dfs(ModelSchemaResp model, Map<Long, ModelSchemaResp> modelMap,
|
private static void dfs(ModelSchemaResp model, Map<Long, ModelSchemaResp> modelMap,
|
||||||
Set<Long> visited, Set<Long> modelCluster) {
|
Set<Long> visited, Set<Long> modelCluster) {
|
||||||
|
if (Objects.isNull(model)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
visited.add(model.getId());
|
visited.add(model.getId());
|
||||||
modelCluster.add(model.getId());
|
modelCluster.add(model.getId());
|
||||||
for (Long neighborId : model.getModelClusterSet()) {
|
for (Long neighborId : model.getModelClusterSet()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user