Skip to content

Commit

Permalink
doc(ark-springboot-starter): 补充注释说明 WebServerFactory 第二个IF空值判断的必要性
Browse files Browse the repository at this point in the history
  • Loading branch information
leewaiho committed Aug 19, 2024
1 parent 698d42f commit 66601fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,8 @@ public WebServer getWebServer(HttpHandler httpHandler) {
ArkClient.getInjectionService().inject(this);
}
if (embeddedNettyService == null) {
// 原有的逻辑中也有这个空值判断, 不确定注入后是否还会有用例会导致 embeddedNettyService 为空
// 因此仍保留此 if 空值判断
return super.getWebServer(httpHandler);
}
if (embeddedNettyService.getEmbedServer(getPort()) == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ public WebServer getWebServer(ServletContextInitializer... initializers) {
ArkClient.getInjectionService().inject(this);
}
if (embeddedServerService == null) {
// 原有的逻辑中也有这个空值判断, 不确定注入后是否还会有用例会导致 embeddedServerService 为空
// 因此仍保留此 if 空值判断
return super.getWebServer(initializers);
}
if (embeddedServerService.getEmbedServer(getPort()) == null) {
Expand Down

0 comments on commit 66601fc

Please sign in to comment.