Skip to content

Commit

Permalink
optimize getBiz method by reduce invoke Map.toArray() (#1286)
Browse files Browse the repository at this point in the history
  • Loading branch information
NTP1996 committed Feb 2, 2024
1 parent c050784 commit c014d3a
Showing 1 changed file with 1 addition and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -251,13 +251,7 @@ public static Biz getBiz(SofaRuntimeManager sofaRuntimeManager) {
if (getInstance().bizManagerService == null) {
return null;
}

for (Biz biz : getInstance().bizManagerService.getBizInOrder()) {
if (biz.getBizClassLoader().equals(sofaRuntimeManager.getAppClassLoader())) {
return biz;
}
}
return null;
return getInstance().bizManagerService.getBizByClassLoader(sofaRuntimeManager.getAppClassLoader());
}

public boolean isHasFinishStartup() {
Expand Down

0 comments on commit c014d3a

Please sign in to comment.