我在 Sonarqube 上发现了这个错误:
private String getMacAdressByPorts(Set<Integer> ports) {
ports.stream().sorted(); // sonar list show "Refactor the code so this stream pipeline is used"
return ports.toString();
} //getMacAdressByPorts
Run Code Online (Sandbox Code Playgroud)
我在网上找了很久,都没有用。请帮助或尝试提供一些想法如何实现这一目标。