Skip to content

Commit 830897f

Browse files
author
Senrian
committed
fix: replace Collections.EMPTY_MAP with Collections.emptyMap()
Replace deprecated Collections.EMPTY_MAP with Collections.emptyMap() to avoid raw type warnings and improve type safety.
1 parent c39506e commit 830897f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

shenyu-admin/src/main/java/org/apache/shenyu/admin/service/manager/impl/PullSwaggerDocServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void pullApiDocument(final UpstreamInstance instance) {
9494
TagDO.TagExt tagExt = tagVO.getTagExt();
9595
long newRefreshTime = System.currentTimeMillis();
9696
String url = getSwaggerRequestUrl(instance);
97-
try (Response response = HTTP_UTILS.requestForResponse(url, Collections.EMPTY_MAP, Collections.EMPTY_MAP, HttpUtils.HTTPMethod.GET)) {
97+
try (Response response = HTTP_UTILS.requestForResponse(url, Collections.emptyMap(), Collections.emptyMap(), HttpUtils.HTTPMethod.GET)) {
9898
if (response.code() == HttpStatus.SC_NOT_FOUND) {
9999
LOG.warn("add api document not found. clusterName={} url={}", instance.getClusterName(), url);
100100
return;

0 commit comments

Comments
 (0)