return value is the same const: do not process returns of containing methods IDEA-204977 (add test)

This commit is contained in:
Dmitry Batkovich
2019-01-17 13:49:17 +03:00
parent c227bbf510
commit 9d72f0473f
2 changed files with 17 additions and 0 deletions
@@ -6,5 +6,12 @@
<problem_class>Method returns the same value</problem_class>
<description>Method always returns &lt;code&gt;0&lt;/code&gt;</description>
</problem>
<problem>
<file>Test.java</file>
<line>10</line>
<problem_class>Method returns the same value</problem_class>
<description>Method always returns &lt;code&gt;0&lt;/code&gt;</description>
</problem>
</problems>
@@ -4,7 +4,17 @@ class Test {
return 0;
}
void test() {
Comparator<String> cmp = new Comparator<String>() {
@Override
public int compare(String a, String b) {
return 0;
}
};
}
public static void main(String[] args) {
System.out.println(new Test().xxx());
new Test().test();
}
}