mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
Java inspection: Don't look for assignment chains in nested code blocks in "Move return to computation" inspection (IDEA-121153)
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// "Move 'return' closer to computation of the value of 'n'" "true"
|
||||
class T {
|
||||
int x;
|
||||
int y;
|
||||
|
||||
int f(int a) {
|
||||
int n = -1;
|
||||
if (a != 0) {
|
||||
n = a;
|
||||
n = 31 * x + n;
|
||||
return 31 * y + n;
|
||||
}
|
||||
return n;
|
||||
}
|
||||
}
|
||||
+11
-11
@@ -1,15 +1,15 @@
|
||||
// "Move 'return' closer to computation of the value of 'n'" "false"
|
||||
// "Move 'return' closer to computation of the value of 'n'" "true"
|
||||
class T {
|
||||
int x;
|
||||
int y;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
int f(int a) {
|
||||
int n = -1;
|
||||
if (a != 0) {
|
||||
n = a;
|
||||
n = 31 * x + n;
|
||||
n = 31 * y + n;
|
||||
int f(int a) {
|
||||
int n = -1;
|
||||
if (a != 0) {
|
||||
n = a;
|
||||
n = 31 * x + n;
|
||||
n = 31 * y + n;
|
||||
}
|
||||
re<caret>turn n;
|
||||
}
|
||||
re<caret>turn n;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user