Hi Team,
The expected SonarQube bug appears not to be caught in the code below, even though it’s caught in a very similar code as seen in the screenshot. Any thoughts?
class UselessIncrementBug {
public void showBug() {
int i = 0;
int j = 0;
int a = 0;
a = i++;
System.out.println("The value of a is: " + a);
System.out.println("The value of j is: " + j++);
}
public static void main(String[] args) {
UselessIncrementBug bug = new UselessIncrementBug();
bug.showBug();
}
}
Sonarqube version 25.5
Lang: Java
SonarScanner version: 5.0.1.3006
Screenshot of code scan results
