Sonar扫描时,提示异常:Intermediate Stream methods should not be left unused,如何解决?

运行环境

java版本:17
sonarqube: 8.9.10
sonarscanner:4.6.0.2311

java stream代码通过Sonar扫描时,提示异常:Intermediate Stream methods should not be left unused
以下是简化的代码方法
public List getBizApplications() {
    var services = discoveryClient.getServices();
    return services.stream()
            .filter(name -> name.startsWith("biz-service-"))
            .map(this::selectServiceInstance)
            .toList();
}
以下是sonar提供的参考示例
  1. Noncompliant Code Example
    widgets.stream().filter(b -> b.getColor() == RED); // Noncompliant
    
  2. Compliant Solution
    int sum = widgets.stream()
                       .filter(b -> b.getColor() == RED)
                       .mapToInt(b -> b.getWeight())
                       .sum();
    Stream pipeline = widgets.stream()
                                  .filter(b -> b.getColor() == GREEN)
                                  .mapToInt(b -> b.getWeight());
    sum = pipeline.sum();
    
我按照sonar提示无法做出修改方案,求解答!

你试下你简化的这个代码还能扫描出来这个问题么