Hi Sonarqube Team,
The code below seems to contain the bug described in RSPEC-5866, however, the bug was not being detected during the scan. Any thoughts?
import java.util.regex.Pattern;
class CaseInsensitiveUnicodeBug {
public boolean showBug(String input, String regex) {
Pattern pattern = Pattern.compile(regex, Pattern.CASE_INSENSITIVE);
return pattern.matcher(input).find();
}
public static void main(String[] args) {
CaseInsensitiveUnicodeBug bug = new CaseInsensitiveUnicodeBug();
String input = "söme pättern";
String regex = "SÖME PÄTTERN";
System.out.println(bug.showBug(input, regex));
}
}
Sonarqube version 25.5
Lang: Java
SonarScanner version: 5.0.1.3006
Screenshot of code scan results
