admin 管理员组

文章数量: 1087132

Small question regarding a Spotbugs finding I am having a hard time fixing.

In this super simple class:

import .springframework.web.reactive.function.client.WebClient;

@Service
public final class MyService {
    
    private final WebClient webClient;
    
    public MyService(final WebClient client) {
        this.webClient = client;
    }

I am getting flagged on the observationRegistry with

may expose internal representation by storing an externally mutable object into MyService.webClient

I tried invoking a possible clone() method on the web client, but no luck.

How do I fix this?

本文标签:

Error[2]: Invalid argument supplied for foreach(), File: /www/wwwroot/roclinux.cn/tmp/view_template_quzhiwa_htm_read.htm, Line: 58
File: /www/wwwroot/roclinux.cn/tmp/route_read.php, Line: 205, include(/www/wwwroot/roclinux.cn/tmp/view_template_quzhiwa_htm_read.htm)
File: /www/wwwroot/roclinux.cn/tmp/index.inc.php, Line: 129, include(/www/wwwroot/roclinux.cn/tmp/route_read.php)
File: /www/wwwroot/roclinux.cn/index.php, Line: 29, include(/www/wwwroot/roclinux.cn/tmp/index.inc.php)