Hi Sonarqube Team,
The code below seems to contain the bug described in RSPEC-6322, however, the bug was not being detected during the scan. Any thoughts?
import java.util.Collections;
import java.util.List;
class UnsupportedCollectionOperationBug {
public String showBug() {
List<String> emptyList = Collections.emptyList();
emptyList.add("bug");
return emptyList.toString();
}
}
Sonarqube version 25.5
Lang: Java
SonarScanner version: 5.0.1.3006
Screenshot of code scan results

