mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Method with same arguments message updated (IDEA-142026)
This commit is contained in:
@@ -1,16 +1,16 @@
|
||||
class X {
|
||||
void test(int x, int y) {
|
||||
System.out.println(Math.<warning descr="Arguments of 'max()' are always the same which unlikely makes sense">max</warning>(x, x));
|
||||
System.out.println(Math.<warning descr="Arguments of 'max' are the same. Calling this method with the same arguments is meaningless.">max</warning>(x, x));
|
||||
int z = x;
|
||||
System.out.println(Math.<warning descr="Arguments of 'min()' are always the same which unlikely makes sense">min</warning>(x, z));
|
||||
System.out.println(Math.<warning descr="Arguments of 'min' are the same. Calling this method with the same arguments is meaningless.">min</warning>(x, z));
|
||||
String s = "foo";
|
||||
String t = "foo";
|
||||
System.out.println("foobar".<warning descr="Arguments of 'replace()' are always the same which unlikely makes sense">replace</warning>(s, t));
|
||||
System.out.println("foobar".<warning descr="Arguments of 'replace()' are always the same which unlikely makes sense">replace</warning>('x', 'x'));
|
||||
System.out.println("foobar".<warning descr="Arguments of 'replace' are the same. Calling this method with the same arguments is meaningless.">replace</warning>(s, t));
|
||||
System.out.println("foobar".<warning descr="Arguments of 'replace' are the same. Calling this method with the same arguments is meaningless.">replace</warning>('x', 'x'));
|
||||
}
|
||||
|
||||
int testCondition(int a) {
|
||||
if(a == 100) return Math.<warning descr="Arguments of 'max()' are always the same which unlikely makes sense">max</warning>(a, 100);
|
||||
if(a == 100) return Math.<warning descr="Arguments of 'max' are the same. Calling this method with the same arguments is meaningless.">max</warning>(a, 100);
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ dataflow.message.array.index.out.of.bounds=Array index is out of bounds
|
||||
dataflow.message.immutable.modified=Immutable object is modified
|
||||
dataflow.message.immutable.passed=Immutable object is passed where mutable is expected
|
||||
dataflow.message.redundant.assignment=Variable is already assigned to this value
|
||||
dataflow.message.pointless.same.arguments=Arguments of '#ref()' are always the same which unlikely makes sense
|
||||
dataflow.message.pointless.same.arguments=Arguments of '#ref' are the same. Calling this method with the same arguments is meaningless.
|
||||
|
||||
inspection.optional.get.without.is.present.message=<code>{0}.#ref()</code> without ''isPresent()'' check
|
||||
|
||||
|
||||
Reference in New Issue
Block a user