Skip to content

Commit 6eb9550

Browse files
committed
🐛 解决未设置 httpConfig 时引发的空指针异常
1 parent 1f2e743 commit 6eb9550

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/main/java/com/xkcoding/http/HttpUtil.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,9 @@ private void checkHttpNotNull(Http proxy) {
8585

8686
public void setConfig(HttpConfig httpConfig) {
8787
checkHttpNotNull(proxy);
88+
if (null == httpConfig) {
89+
httpConfig = new HttpConfig();
90+
}
8891
proxy.setHttpConfig(httpConfig);
8992
}
9093

0 commit comments

Comments
 (0)