[java-inspections] IDEA-285964 Replacement for 'Expression can be replaced with Double.compare()' sometimes breaks the code

Option is added to disable the inspection when semantics change is possible

GitOrigin-RevId: 97e5576582b65c3ba0cb3122d6274a37e271386d
This commit is contained in:
Tagir Valeev
2022-01-10 10:15:10 +07:00
committed by intellij-monorepo-bot
parent 71a587c4b2
commit 2d08b71a4e
7 changed files with 57 additions and 9 deletions

View File

@@ -0,0 +1,8 @@
// "Fix all ''compare()' method can be used to compare numbers' problems in file" "true"
public class Test {
public int test(double a, double b) {
<caret>if (a < b) return -1;
if (a > b) return 1;
return 0;
}
}